[ruby-core:114049] [Ruby master Bug#19750] Ruby hangs when parsing Regexp with unterminated unicode "/\u{"

Issue #19750 has been reported by tompng (tomoya ishida). ---------------------------------------- Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{" https://bugs.ruby-lang.org/issues/19750 * Author: tompng (tomoya ishida) * Status: Open * Priority: Normal * ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- 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/

Issue #19750 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to jeremyevans0 (Jeremy Evans) According to git bisect, this is since commit:ec3542229b29ec93062e9d90e877ea29d3c19472. @jeremyevans0 Could you take a look at this issue? ---------------------------------------- Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{" https://bugs.ruby-lang.org/issues/19750#change-103717 * Author: tompng (tomoya ishida) * Status: Assigned * 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: UNKNOWN ---------------------------------------- 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/

Issue #19750 has been updated by jeremyevans0 (Jeremy Evans). mame (Yusuke Endoh) wrote in #note-2:
According to git bisect, this is since commit:ec3542229b29ec93062e9d90e877ea29d3c19472. @jeremyevans0 Could you take a look at this issue?
Sure, I'll take a look today. ---------------------------------------- Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{" https://bugs.ruby-lang.org/issues/19750#change-103719 * Author: tompng (tomoya ishida) * Status: Assigned * 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: UNKNOWN ---------------------------------------- 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/

Issue #19750 has been updated by jeremyevans0 (Jeremy Evans). I submitted a pull request to fix this: https://github.com/ruby/ruby/pull/8003 ---------------------------------------- Bug #19750: Ruby hangs when parsing Regexp with unterminated unicode "/\u{" https://bugs.ruby-lang.org/issues/19750#change-103720 * Author: tompng (tomoya ishida) * Status: Assigned * 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: UNKNOWN ---------------------------------------- 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/

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/
participants (4)
-
jeremyevans0 (Jeremy Evans)
-
mame (Yusuke Endoh)
-
nagachika (Tomoyuki Chikanaga)
-
tompng (tomoya ishida)