diff options
| author | Luke Gruber <luke.gruber@shopify.com> | 2025-12-18 15:42:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-18 15:42:49 -0500 |
| commit | aace29d485559e38ca06923a6af335dbb5fb28f1 (patch) | |
| tree | 0742779ec540b43a16696ca7978a7a27b65f4495 /spec/ruby | |
| parent | a7eb1879ad35a0b5d9d32fcdbf2f840bd2c8858c (diff) | |
Check for NULL fields in TYPEDDATA memsize functions (#15633)
Some TYPEDDATA objects allocate struct fields using the GC right after
they get created, and in that case the VM can try to perform a GC and join
a barrier if another ractor started one. If we're dumping the heap in another
ractor, this acquires a barrier and it will call the `rb_obj_memsize` function on this
object. We can't assume these struct fields are non-null. This also goes for C extensions,
which may cause problems with heap dumping from a ractor if their memsize functions aren't
coded correctly to check for NULL fields. Because dumping the heap from a ractor is likely a
rare scenario and it has only recently been introduced, we'll have to see how this works in
practice and if it causes bugs.
Diffstat (limited to 'spec/ruby')
0 files changed, 0 insertions, 0 deletions
