summaryrefslogtreecommitdiff
path: root/ext/objspace/depend
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2024-01-18 12:57:01 +0900
committernagachika <nagachika@ruby-lang.org>2024-01-18 12:57:01 +0900
commit99c9aeef4b4417120e30b145cf98e1bc68a2a0de (patch)
tree92c572cbdc8ce5c6d5401c4efbe15d0de16cca51 /ext/objspace/depend
parent3302e251dccec1e981945ab19d316d0856c68bf6 (diff)
merge revision(s) b8a3f1bd456f92866c4a7bd83235f78c574784a8:
Fix crash in tracing object allocations ObjectSpace.trace_object_allocations_start could crash since it adds a TracePoint for when objects are freed. However, TracePoint could crash since it modifies st tables while inside the GC that is trying to free the object. This could cause a memory allocation to happen which would crash if it triggers another GC. See a crash log: http://ci.rvm.jp/results/trunk@ruby-sp1/4373707 --- ext/objspace/depend | 1 + ext/objspace/object_tracing.c | 7 +++++++ gc.h | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-)
Diffstat (limited to 'ext/objspace/depend')
-rw-r--r--ext/objspace/depend1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/objspace/depend b/ext/objspace/depend
index e76cfa963f..52797664e0 100644
--- a/ext/objspace/depend
+++ b/ext/objspace/depend
@@ -158,6 +158,7 @@ object_tracing.o: $(hdrdir)/ruby/missing.h
object_tracing.o: $(hdrdir)/ruby/ruby.h
object_tracing.o: $(hdrdir)/ruby/st.h
object_tracing.o: $(hdrdir)/ruby/subst.h
+object_tracing.o: $(top_srcdir)/gc.h
object_tracing.o: $(top_srcdir)/internal.h
object_tracing.o: object_tracing.c
object_tracing.o: objspace.h