[#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:114224] [Ruby master Bug#19773] Intermittent SIGSEGV during marking of Ripper parser
From:
"eightbitraptor (Matthew Valentine-House) via ruby-core" <ruby-core@...>
Date:
2023-07-17 22:11:18 UTC
List:
ruby-core #114224
Issue #19773 has been reported by eightbitraptor (Matthew Valentine-House). ---------------------------------------- Bug #19773: Intermittent SIGSEGV during marking of Ripper parser https://bugs.ruby-lang.org/issues/19773 * Author: eightbitraptor (Matthew Valentine-House) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- Intermittent SIGSEGV during marking of the Ripper parser. A failing build [can be seen on ci.rvm.jp (build 4643684)](http://ci.rvm.jp/results/trunk-random2@ruby-sp2-docker/4643684). Inside `ripper_s_allocate` first we use `TypedData_Make_Struct` to create a new `T_DATA` object in the Ruby heap. This allocates an empty struct (`struct ripper`). Further down the function we allocate another struct (`struct parser_params` during `rb_ruby_ripper_parser_allcoate`) and assign it to a pointer from the first struct, which is attached to the `T_DATA` object. `rb_ruby_ripper_parser_allocate` can trigger GC, as it uses `ruby_xcalloc`. But if GC is triggered at this point then the `parser_params` have not been allocated yet, and so the `struct ripper` contains a `NULL` reference. This causes a SEGV when we try and mark the `T_DATA` wrapper around the `struct ripper`. This can be replicated locally using the following test script ``` require "ripper" GC.stress = true Ripper.new ``` -- 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/