Bug #20295: Segmentation fault when parsing `/invalid_regexp/ =~ s` - Ruby - Ruby Issue Tracking System
Project General Profile Ruby All Projects Ruby Overview Activity Roadmap Issues Repository Custom queries Backport 3.3 Backport 3.4 Backport 4.0 bugs: unassigned DevMeeting matz Open issues with attachment Windows Actions Copy link Bug #20295 closed Segmentation fault when parsing `/invalid_regexp/ =~ s` Bug #20295: Segmentation fault when parsing `/invalid_regexp/ =~ s` Added by tompng (tomoya ishida) over 2 years ago.
Updated over 2 years ago. Status: Closed Assignee: - Target version: - ruby -v : ruby 3.4.0dev (2024-02-20T23:06:48Z master e7ab5d891c) +YJIT +MN [arm64-darwin22] Backport : 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN [ruby-core:116913] Description These should be Syntax Error, but segfaults ./ruby -ce "/[/=~s" ./ruby -ce "/(?<>)/=~s" ./ruby -ce "/(?<a>[)/=~s" ./ruby -ce "/[/=~s" -e:1: premature end of char-class: /[/ ./ruby: [BUG] Segmentation fault at 0x0000000000000014 ruby 3.4.0dev (2024-02-20T23:06:48Z master e7ab5d891c) +YJIT +MN [arm64-darwin22] -- Crash Report log information -------------------------------------------- See Crash Report log file in one of the following locations: * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details.
Don't forget to include the above Crash Report log file in bug reports. -- Control frame information ----------------------------------------------- c:0001 p:0000 s:0003 E:001960 DUMMY [FINISH] -- Threading information --------------------------------------------------- Total ractor count: 1 Ruby thread count for this ractor: 1 -- Machine register context ------------------------------------------------ x0: 0x0000000000000000 x1: 0x0000000000000039 x2: 0x0000000000000038 x3: 0x0000000000000008 x4: 0x0000000000000001 x5: 0x0000000000000001 x6: 0x0000000100a3ce00 x7: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000000000001 x20: 0x000000012482f6b0 x21: 0x0000000123a08ab0 x22: 0x000000016fb5d0d0 x23: 0x000000012482f6e0 x24: 0x000000012482f708 x25: 0x0000000000000004 x26: 0x00000001006259b5 x27: 0x000000016fb5de30 x28: 0x000000016fb5e450 lr: 0x00000001003e47ac fp: 0x000000016fb5cf60 sp: 0x000000016fb5cef0 -- C level backtrace information ------------------------------------------- /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_vm_bugreport+0xb4c) [0x1004ff4cc] ../vm_dump.c:1151 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_vm_bugreport) (null):0 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_bug_for_fatal_signal+0x100) [0x10033e0dc] ../error.c:1065 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(sig_do_nothing+0x0) [0x100465bc4] ../signal.c:926 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(sigsegv) (null):0 /usr/lib/system/libsystem_platform.dylib(_sigtramp+0x38) [0x1a8b6aa84] /Users/tomoya.ishida/github/ruby/ruby/build/ruby(reg_named_capture_assign+0xc) [0x1003e47ac] parse.y:15909 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(match_op) parse.y:13082 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(ruby_yyparse+0x2c30) [0x1003dcb08] parse.y:4010 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(yycompile0+0x238) [0x1003ede94] parse.y:7653 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_suppress_tracing+0xcc) [0x100500c7c] ../vm_trace.c:487 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(yycompile+0x5c) [0x1003e9ff8] parse.y:7709 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(parser_compile_string) parse.y:7772 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_ruby_parser_compile_string_path) parse.y:7779 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_ruby_parser_compile_string+0x1c) [0x1003ec1b4] parse.y:7785 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_parser_compile_string) parse.y:16260 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(process_script+0x84) [0x10045beb0] ../ruby.c:2066 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(process_options) ../ruby.c:2416 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(ruby_process_options) ../ruby.c:3043 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(ruby_options+0xa0) [0x10034835c] ../eval.c:118 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(rb_main+0x18) [0x1002a26cc] ../main.c:40 /Users/tomoya.ishida/github/ruby/ruby/build/ruby(main) ../main.c:59 -- Other runtime information ----------------------------------------------- * Loaded script: ./ruby * Loaded features: 0 enumerator.so 1 thread.rb 2 fiber.so 3 rational.so 4 complex.so 5 ruby2_keywords.rb * Process memory map: 1002a0000-100720000 r-x /Users/tomoya.ishida/github/ruby/ruby/build/ruby 100720000-100738000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby 100738000-10073c000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby 10073c000-100750000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby 100750000-10093c000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby 10093c000-10097c000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 10097c000-100980000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100980000-100988000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100988000-10098c000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 10098c000-100990000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100990000-100994000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100994000-100998000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100998000-1009a4000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009a4000-1009a8000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009a8000-1009ac000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009ac000-1009b8000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009b8000-1009bc000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009bc000-1009c0000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009c0000-1009cc000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009cc000-1009d0000 --- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009d0000-1009d4000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009d4000-1009d8000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009d8000-1009dc000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009dc000-1009e0000 r-- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 1009e0000-100a20000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100a30000-100a40000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 100a40000-101e40000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 101e40000-109e40000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 109e40000-111e40000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 111e40000-119e40000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 119e50000-119e60000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 119e70000-119e80000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 119e90000-119ea0000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 119eb0000-119ec0000 rw- /Users/tomoya.ishida/github/ruby/ruby/build/ruby.dSYM/Contents/Resources/DWARF/ruby 119ed0000-119ee0000 rw- /Users/tomoya.ishida/github/rub
The rest of this page is on the live site.