1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/-ext-/test_bug-14834.rb
卜部昌平 5d33f78716 fix tracepoint + backtrace SEGV
PC modification in gc_event_hook_body was careless.  There are (so
to say) abnormal iseqs stored in the cfp.  We have to check sanity
before we touch the PC.

This has not been fixed because there was no way to (ab)use the
setup from pure-Ruby.  However by using our official C APIs it is
possible to touch such frame(s), resulting in SEGV.

Fixes [Bug #14834].
2019-08-01 16:00:59 +09:00

12 lines
268 B
Ruby

# frozen_string_literal: true
class Test_BUG_14834 < Test::Unit::TestCase
def test
assert_ruby_status [], <<~'end;', '[ruby-core:87449] [Bug #14834]'
require '-test-/bug_14834'
Bug.bug_14834 do
[123].group_by {}
end
end;
end
end