mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) 265c002239
: [Backport #17653]
Do not allocate ractor-local storage in dfree function during GC --- random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
This commit is contained in:
parent
5816725ccc
commit
713d6d5eb0
2 changed files with 3 additions and 2 deletions
3
random.c
3
random.c
|
@ -261,7 +261,8 @@ const rb_data_type_t rb_random_data_type = {
|
|||
static void
|
||||
random_mt_free(void *ptr)
|
||||
{
|
||||
if (ptr != default_rand())
|
||||
rb_random_mt_t *rnd = rb_ractor_local_storage_ptr(default_rand_key);
|
||||
if (ptr != rnd)
|
||||
xfree(ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue