Project

General

Profile

Actions

Bug #19750

closed

Ruby hangs when parsing Regexp with unterminated unicode "/\u{"

Added by tompng (tomoya ishida) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
[ruby-core:114049]

Description

Ruby hangs up for a while and gets failed to allocate memory (NoMemoryError)

$ ruby -e "/\\u{"
ruby: failed to allocate memory (NoMemoryError)
RubyVM::AbstractSyntaxTree.parse "/\\u{"
# => SyntaxError

RubyVM::AbstractSyntaxTree.parse "/\\u{\n"
# => failed to allocate memory (NoMemoryError)

Found in https://github.com/ruby/irb/issues/620


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #18294: error when parsing regexp commentClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0