summaryrefslogtreecommitdiff
path: root/vm_trace.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-07-24 05:32:09 +0900
committerKoichi Sasada <ko1@atdot.net>2019-07-24 05:39:09 +0900
commitdf317151a5b4e0c5a30fcc321a9dc6abad63f7ed (patch)
tree89eb41fc15d3d463b662f582c293a34d7d05e739 /vm_trace.c
parenta4e5690760c9177bc4234fdc5152d82ba73d26d0 (diff)
should not free local hook_list here.
exec_hooks_postcheck() clean executed hook_list if it is needed. list_exec is freed if there are no events and this list is local event (connected to specific iseq). However, iseq keeps to point this local hook_list, freed list. To prevent this situation, do not free hook_list here even if it has no events. This issue is reported by @joker1007. https://twitter.com/joker1007/status/1153649170797830144
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/vm_trace.c b/vm_trace.c
index da68a0a8de..ac7550d7e9 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -198,9 +198,6 @@ clean_hooks(const rb_execution_context_t *ec, rb_hook_list_t *list)
}
else {
/* local events */
- if (list->events == 0) {
- ruby_xfree(list);
- }
}
}