ruby-changes:63750
From: Koichi <ko1@a...>
Date: Wed, 25 Nov 2020 16:17:25 +0900 (JST)
Subject: [ruby-changes:63750] 7aaf6676c4 (master): should stop other ractors on transient_heap_evacuate
https://git.ruby-lang.org/ruby.git/commit/?id=7aaf6676c4 From 7aaf6676c416e773b0b3053de2e250a73c2b2e77 Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 25 Nov 2020 16:14:01 +0900 Subject: should stop other ractors on transient_heap_evacuate transient_heap_evacuate() evacuates all living objects from theap to malloc mangaed memory. This evacuation can run in any ractors in parallel with other ractor's execution and it is danger. To stop such danger parallel execution, use rb_vm_barrier() to stop all other ractors. diff --git a/transient_heap.c b/transient_heap.c index 501876d..357e4a4 100644 --- a/transient_heap.c +++ b/transient_heap.c @@ -776,6 +776,7 @@ static void https://github.com/ruby/ruby/blob/trunk/transient_heap.c#L776 transient_heap_evacuate(void *dmy) { RB_VM_LOCK_ENTER(); + rb_vm_barrier(); { struct transient_heap* theap = transient_heap_get(); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/