| Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/prism/commit/eb1d518736
|
|
https://github.com/ruby/prism/commit/3da08fd638
|
|
https://github.com/ruby/prism/commit/92b48ce940
|
|
https://github.com/ruby/prism/commit/2b5298128e
|
|
https://github.com/ruby/prism/commit/01d575aa2f
|
|
https://github.com/ruby/prism/commit/8ad880255d
|
|
https://github.com/ruby/prism/commit/8d1df7815e
|
|
https://github.com/ruby/prism/commit/cc93903d08
|
|
https://github.com/ruby/prism/commit/60e105fc0c
|
|
https://github.com/ruby/prism/commit/af683324ea
|
|
https://github.com/ruby/prism/commit/895b395b99
|
|
https://github.com/ruby/prism/commit/0862b48f0c
|
|
https://github.com/ruby/prism/commit/e4df04157a
|
|
https://github.com/ruby/prism/commit/bda0f889b5
|
|
https://github.com/ruby/prism/commit/429672ea58
|
|
https://github.com/ruby/prism/commit/b2658d2262
|
|
https://github.com/ruby/prism/commit/3bdd79257b
|
|
https://github.com/ruby/prism/commit/1d6a9669dc
|
|
Move all the logic from prism.c into regexp.c. Now regexp.c does two passes. The first pass scans the raw source to track escape types, non-ASCII literals, and multibyte validity for encoding validation. The second pass scans the unescaped content for named capture extraction (needed because escape sequences like line continuations alter group names).
Fixed a couple of things along the way. ascii_only was previously computed from unescaped content, but we can do that as we go to avoid scanning again. Unicode properties also now properly error for regexp with modifiers.
https://github.com/ruby/prism/commit/0944c7fba2
|
|
https://github.com/ruby/prism/commit/03797b84d3
|
|
Parsing the regexp /\A{/ causes uses an uninitialized value because it
tries to parse it as a range quantifier, so it reads the character after
the closing curly bracket. This is using uninitialized values because
prism strings are not null terminated. This can be seen in the Valgrind
output:
==834710== Conditional jump or move depends on uninitialised value(s)
==834710== at 0x5DA010: pm_regexp_parse_range_quantifier (regexp.c:163)
==834710== by 0x5DA010: pm_regexp_parse_quantifier (regexp.c:243)
==834710== by 0x5DAD69: pm_regexp_parse_expression (regexp.c:738)
==834710== by 0x5DAD69: pm_regexp_parse_pattern (regexp.c:761)
==834710== by 0x5DAD69: pm_regexp_parse (regexp.c:773)
==834710== by 0x5A2EE7: parse_regular_expression_named_captures (prism.c:20886)
==834710== by 0x5A2EE7: parse_expression_infix (prism.c:21388)
==834710== by 0x5A5FA5: parse_expression (prism.c:21804)
==834710== by 0x5A64F3: parse_statements (prism.c:13858)
==834710== by 0x5A9730: parse_program (prism.c:22011)
==834710== by 0x576F0D: parse_input_success_p (extension.c:1062)
==834710== by 0x576F0D: parse_success_p (extension.c:1084)
This commit adds checks for the end of the string to
pm_regexp_parse_range_quantifier.
https://github.com/ruby/prism/commit/be6cbc23ef
|
|
https://github.com/ruby/prism/commit/098b3f08bc
|
|
https://github.com/ruby/prism/commit/bedc4585ed
|
|
https://github.com/ruby/prism/commit/11e0e204ce
|
|
https://github.com/ruby/prism/commit/27e7685dd4
|
|
https://github.com/ruby/prism/commit/953601e3c0
|
|
https://github.com/ruby/prism/commit/2e02fa3b80
|
|
https://github.com/ruby/prism/commit/e0e8bba8be
|
|
https://github.com/ruby/prism/commit/b03afbe857
|
|
https://github.com/ruby/prism/commit/c19b0fa185
|
|
https://github.com/ruby/prism/commit/29d80e486e
|
|
https://github.com/ruby/prism/commit/17dc6b6281
|
|
https://github.com/ruby/prism/commit/ce4c67fb3a
|
|
No encodings are guaranteed in C compilers, and other than UTF-8
encodings may be assumed in some platforms, e.g., CP932 on Windows
Japanese edition, and may result in compilation errors.
|
|
https://github.com/ruby/prism/commit/e327449db6
|
|
https://github.com/ruby/prism/commit/16e0579044
|
|
https://github.com/ruby/prism/commit/ee54244800
|
|
|
|
|