mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 17:06:21 +08:00
Don't re-embed after compaction for these types if they are pinned because if these objects aren't embedded we want to keep their xmalloc's backing storage intact so that RARRAY_PTR and RSTRING_PTR don't point to freed memory across a compaction event. If the object is pinned we want to be able to trust that these pointers can't go stale across an allocation. Fixes [Bug #22237] (Backport 4.0)