mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
5d33f78716
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].
12 lines
268 B
Ruby
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
|