summaryrefslogtreecommitdiff
path: root/test/.excludes-prism/TestSyntax.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-05-23 18:24:48 +0900
committerYusuke Endoh <mame@ruby-lang.org>2024-05-23 19:26:45 +0900
commit1471a160ba1bbdca9d6c4b21260793c1414253f3 (patch)
tree5cf4f94faddcbe1f071d9e8b3185941791cd8d61 /test/.excludes-prism/TestSyntax.rb
parentce20367a0e2f1fcfabebf3b6bea732fc71fa79f7 (diff)
Add RB_GC_GUARD for rb_str_to_parser_stringHEADmaster
I think this fixes the following random test failure that could not be fixed for a long time: ``` 1) Failure: TestSymbol#test_inspect_under_gc_compact_stress [/home/chkbuild/chkbuild/tmp/build/20240522T003003Z/ruby/test/ruby/test_symbol.rb:126]: <":testing"> expected but was <":\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\"">. ``` The value passed to this function is the return value of `rb_id2str`, so it is never collected. However, if auto_compact is enabled, the string may move and `RSTRING_PTR(str)` became invalid. This change prevents the string from being moved by RB_GC_GUARD.
Diffstat (limited to 'test/.excludes-prism/TestSyntax.rb')
0 files changed, 0 insertions, 0 deletions