sync fstring_table for deletion
Ractors can access this table simultaneously so we need to sync accesses.
This commit is contained in:
parent
609e6ac0ca
commit
dd5db6f5fe
Notes:
git
2020-09-18 14:18:21 +09:00
5
string.c
5
string.c
@ -1378,9 +1378,14 @@ rb_str_free(VALUE str)
|
||||
{
|
||||
if (FL_TEST(str, RSTRING_FSTR)) {
|
||||
st_data_t fstr = (st_data_t)str;
|
||||
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
st_delete(rb_vm_fstring_table(), &fstr, NULL);
|
||||
RB_DEBUG_COUNTER_INC(obj_str_fstr);
|
||||
}
|
||||
RB_VM_LOCK_LEAVE();
|
||||
}
|
||||
|
||||
if (STR_EMBED_P(str)) {
|
||||
RB_DEBUG_COUNTER_INC(obj_str_embed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user