Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rb_gc_register_address() must be called after the variable was assign…
…ed (#345) rb_gc_register_address() must be called after the variable was assigned. Otherwise the GC might read the variable when it is not pointing to a Ruby object yet. TruffleRuby also assumes it can read the pointer when rb_gc_register_address() is called: oracle/truffleruby#2720 * Prefer rb_gc_register_mark_object() since the variable is never reassigned * Mark immediately after assigning the variable to prevent the VALUE to move by GC compaction on CRuby
- Loading branch information