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:
NARUSE, Yui 2021-03-02 18:27:43 +09:00
parent 5816725ccc
commit 713d6d5eb0
2 changed files with 3 additions and 2 deletions

View file

@ -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);
}

View file

@ -12,7 +12,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
#define RUBY_PATCHLEVEL 43
#define RUBY_PATCHLEVEL 44
#define RUBY_RELEASE_YEAR 2021
#define RUBY_RELEASE_MONTH 3