Project

General

Profile

« Previous | Next » 

Revision f4476f0d

Added by peterzhu2118 (Peter Zhu) 7 months ago

Disable GC during RUBY_INTERNAL_EVENT_NEWOBJ

We must disable GC when running RUBY_INTERNAL_EVENT_NEWOBJ hooks because
the callback could call xmalloc which could potentially trigger a GC,
and a lot of code is unsafe to trigger a GC right after an object has
been allocated because they perform initialization for the object and
assume that the GC does not trigger before then.