aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/io_select.rb
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2019-09-11 14:02:05 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2019-09-11 14:58:51 -0700
commit515b1989b1093a4dddef83d0cda763c9ae6760e3 (patch)
tree2643015bd03caf3de2d9ba2a383052dd8fcdec2c /benchmark/io_select.rb
parent21994b7fd686f263544fcac1616ecf3189fb78b3 (diff)
downloadruby-515b1989b1093a4dddef83d0cda763c9ae6760e3.tar.gz
Make NODE_ARYPTN layout consistent between Ripper and AST
We are seeing SEGVs in CI: http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2253563 This is happening because Ripper constructs AST nodes differently than parse.y normally does. Specifically in this case Ripper is assigning 3 `VALUE` objects: https://github.com/ruby/ruby/blob/1febb6f4a14f7222c6d30250bfdc252d34238187/parse.y#L757-L761 Where parse.y will normally assign other things: https://github.com/ruby/ruby/blob/1febb6f4a14f7222c6d30250bfdc252d34238187/parse.y#L11258-L11260 The important one is the last one, the `struct rb_ary_pattern_info`. The mark function assumed that `NODE_ARYPTN` have a pointer to `struct rb_ary_pattern_info`, and used it: https://github.com/ruby/ruby/blob/1febb6f4a14f7222c6d30250bfdc252d34238187/node.c#L1269-L1274 In the case of Ripper, `NODE_ARYPTN` doesn't point to an `rb_ary_pattern_info`, so the mark function would SEGV. This commit changes Ripper so that its `NODE_ARYPTN` nodes also point at an `rb_ary_pattern_info`, and the mark function can continue with the same assumption.
Diffstat (limited to 'benchmark/io_select.rb')
0 files changed, 0 insertions, 0 deletions