From b385f7670ffa420790bc548747fa4b58c4c5d8f6 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 11 Mar 2020 10:37:14 -0400 Subject: 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] --- test/-ext-/tracepoint/test_tracepoint.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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 -- cgit v1.2.3