ruby-changes:59882
From: Aaron <ko1@a...>
Date: Fri, 31 Jan 2020 01:23:47 +0900 (JST)
Subject: [ruby-changes:59882] 18e7f9000d (master): Use `rb_gc_mark` when marking globals
https://git.ruby-lang.org/ruby.git/commit/?id=18e7f9000d From 18e7f9000dc3695b9db02ae153d41bd1efa01d6e Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 29 Jan 2020 17:24:39 -0800 Subject: Use `rb_gc_mark` when marking globals I think global references should either be 0 or valid heap pointers. `rb_gc_mark_maybe` checks to see if the pointer is a valid heap pointer, but I believe we already know they are valid addresses diff --git a/variable.c b/variable.c index 1db0614..ed84b85 100644 --- a/variable.c +++ b/variable.c @@ -397,7 +397,7 @@ void https://github.com/ruby/ruby/blob/trunk/variable.c#L397 rb_gvar_val_marker(VALUE *var) { VALUE data = (VALUE)var; - if (data) rb_gc_mark_maybe(data); + if (data) rb_gc_mark(data); } VALUE -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/