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
9
string.c
9
string.c
@ -1378,8 +1378,13 @@ rb_str_free(VALUE str)
|
|||||||
{
|
{
|
||||||
if (FL_TEST(str, RSTRING_FSTR)) {
|
if (FL_TEST(str, RSTRING_FSTR)) {
|
||||||
st_data_t fstr = (st_data_t)str;
|
st_data_t fstr = (st_data_t)str;
|
||||||
st_delete(rb_vm_fstring_table(), &fstr, NULL);
|
|
||||||
RB_DEBUG_COUNTER_INC(obj_str_fstr);
|
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)) {
|
if (STR_EMBED_P(str)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user