diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2020-03-11 10:37:14 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2020-03-29 23:41:19 -0400 |
commit | b385f7670ffa420790bc548747fa4b58c4c5d8f6 (patch) | |
tree | 43d129066268a271ba22271253c2dedc2e8335f7 /test/-ext- | |
parent | 2a3f45bdb39c750e6f55525151cf3f9a5d727617 (diff) |
Clear all trace events during teardown
Since 0c2d81dada, not all trace events are cleared during VM teardown.
This causes a crash when there is a tracepoint for
`RUBY_INTERNAL_EVENT_GC_EXIT` active during teardown.
The commit looks like a refactoring commit so I think this change was
unintentional.
[Bug #16682]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2959
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/tracepoint/test_tracepoint.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb index 4f480bb856..79ba090e4c 100644 --- a/test/-ext-/tracepoint/test_tracepoint.rb +++ b/test/-ext-/tracepoint/test_tracepoint.rb @@ -77,4 +77,8 @@ class TestTracepointObj < Test::Unit::TestCase end end + def test_teardown_with_active_GC_end_hook + assert_separately([], 'require("-test-/tracepoint"); Bug.after_gc_exit_hook = proc {}') + end + end |