[#114181] [Ruby master Bug#19767] [Not really a bug, but more a not ideal notification] "historical binary regexp match" when using the "n" modifier in a ruby regex — "rubyFeedback (robert heiler) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5NzY3IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHJ1YnlGZWVkYmFjayAocm9iZXJ0IGhl
3 messages
2023/07/14
[ruby-core:114216] [Ruby master Bug#19750] Ruby hangs when parsing Regexp with unterminated unicode "/\u{"
From:
"nagachika (Tomoyuki Chikanaga) via ruby-core" <ruby-core@...>
Date:
2023-07-17 09:21:49 UTC
List:
ruby-core #114216
Issue #19750 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED to 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: DONE
ruby_3_2 3f6187a94797d3c4a7db00563a885e4e613b51cf merged revision(s) 1bc8838d60ef3fc6812d3b64ed87caaf0ae943d9.
----------------------------------------
Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{"
https://bugs.ruby-lang.org/issues/19750#change-103904
* Author: tompng (tomoya ishida)
* Status: Closed
* Priority: Normal
* Assignee: jeremyevans0 (Jeremy Evans)
* ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: DONE
----------------------------------------
Ruby hangs up for a while and gets `failed to allocate memory (NoMemoryError)`
~~~shell
$ ruby -e "/\\u{"
ruby: failed to allocate memory (NoMemoryError)
~~~
~~~ruby
RubyVM::AbstractSyntaxTree.parse "/\\u{"
# => SyntaxError
RubyVM::AbstractSyntaxTree.parse "/\\u{\n"
# => failed to allocate memory (NoMemoryError)
~~~
Found in https://github.com/ruby/irb/issues/620
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/