summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-03-11 10:37:14 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2020-03-29 23:41:19 -0400
commitb385f7670ffa420790bc548747fa4b58c4c5d8f6 (patch)
tree43d129066268a271ba22271253c2dedc2e8335f7 /eval.c
parent2a3f45bdb39c750e6f55525151cf3f9a5d727617 (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 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index b472fec..d976674 100644
--- a/eval.c
+++ b/eval.c
@@ -38,6 +38,7 @@
NORETURN(void rb_raise_jump(VALUE, VALUE));
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
+void rb_ec_clear_all_trace_func(const rb_execution_context_t *ec);
static int rb_ec_cleanup(rb_execution_context_t *ec, volatile int ex);
static int rb_ec_exec_node(rb_execution_context_t *ec, void *n);
@@ -152,7 +153,7 @@ rb_ec_teardown(rb_execution_context_t *ec)
}
EC_POP_TAG();
rb_ec_exec_end_proc(ec);
- rb_ec_clear_current_thread_trace_func(ec);
+ rb_ec_clear_all_trace_func(ec);
}
static void