diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2020-03-11 10:37:14 -0400 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-03-30 19:15:11 +0900 |
commit | b5fa156b7907b8ea1baf8b9f0cb6a66b0fecb3d4 (patch) | |
tree | e2551a6cc79b035f1a74e82da2703822e4c08086 /test | |
parent | 0057fe4063b57b445d6ffc893e442f362e3a19e0 (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]
(cherry picked from commit b385f7670ffa420790bc548747fa4b58c4c5d8f6)
Diffstat (limited to 'test')
-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 e0fafdc744..60bdefd9e0 100644 --- a/test/-ext-/tracepoint/test_tracepoint.rb +++ b/test/-ext-/tracepoint/test_tracepoint.rb @@ -79,4 +79,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 |