diff options
| author | nagachika <nagachika@ruby-lang.org> | 2021-09-05 14:12:20 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2021-09-05 14:12:20 +0900 |
| commit | 3fb51aec5ba7decffdfc32e540262aaae6167a95 (patch) | |
| tree | 2b7db8f9f92cbf740393113360e1c19016508f41 /include/ruby/thread_native.h | |
| parent | 911e75f0547ae3496280a731fbfd986096b0ffb6 (diff) | |
merge revision(s) bbedd29b6e98ef6e3fc2ce2b358d2b509b7cd1bb: [Backport #18117]
[Bug #18117] Fix Ractor race condition with GC
rb_objspace_reachable_objects_from requires that the GC not be active.
Since the Ractor barrier is not executed for incremental sweeping,
Ractor may call rb_objspace_reachable_objects_from after sweeping
has started to share objects. This causes a crash that looks like
the following:
```
<internal:ractor>:627: [BUG] rb_objspace_reachable_objects_from() is not supported while during_gc == true
```
Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
---
bootstraptest/test_ractor.rb | 15 +++++++++++++++
ractor.c | 12 ++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
Diffstat (limited to 'include/ruby/thread_native.h')
0 files changed, 0 insertions, 0 deletions
