You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the mmtk and the dev/mmtk-overrides-default branches, we reimplemented part of String to allocate the buffer in the MMTk heap instead of in the C heap using xmalloc. In many places, the code erroneously assumed that a non-embedded string must have an underlying RSTRING_EXT(str)->strbuf. But for strings with the STR_NOFREE flag, it is not the case. The actual string contents are allocated in C buffers, usually static variables for string literals, that are not supposed to be managed by the GC or freed manually.
We should go through all use cases of strbuf to see if they consider STR_NOFREE.
And we should revisit all assignments to RSTRING(str)->as.heap.ptr to see if there are newly added cases of xmalloc. One example is an rb_xmalloc_mul_add_mul in rb_str_tmp_frozen_no_embed_acquire.
The text was updated successfully, but these errors were encountered:
In the
mmtk
and thedev/mmtk-overrides-default
branches, we reimplemented part ofString
to allocate the buffer in the MMTk heap instead of in the C heap usingxmalloc
. In many places, the code erroneously assumed that a non-embedded string must have an underlyingRSTRING_EXT(str)->strbuf
. But for strings with theSTR_NOFREE
flag, it is not the case. The actual string contents are allocated in C buffers, usually static variables for string literals, that are not supposed to be managed by the GC or freed manually.We should go through all use cases of
strbuf
to see if they considerSTR_NOFREE
.And we should revisit all assignments to
RSTRING(str)->as.heap.ptr
to see if there are newly added cases ofxmalloc
. One example is anrb_xmalloc_mul_add_mul
inrb_str_tmp_frozen_no_embed_acquire
.The text was updated successfully, but these errors were encountered: