Commit a6d94bf
Take VM Lock during rb_gc_{un}register_address (ruby#16097)
The `Rice` C++ library uses an Anchor class that uses RAII to call
`rb_gc_register_address`, `rb_gc_unregister_address` during init+destruct.
It's unclear if this API is meant to be used at runtime like this, but we can
at least lock the VM so it works safely across Ractors and doesn't mangle the
`global_object_list` table.1 parent ec337a8 commit a6d94bf
1 file changed
Lines changed: 22 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3633 | 3633 | | |
3634 | 3634 | | |
3635 | 3635 | | |
3636 | | - | |
3637 | | - | |
3638 | | - | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
3639 | 3641 | | |
3640 | 3642 | | |
3641 | 3643 | | |
| |||
3653 | 3655 | | |
3654 | 3656 | | |
3655 | 3657 | | |
3656 | | - | |
3657 | | - | |
3658 | | - | |
3659 | | - | |
3660 | | - | |
3661 | | - | |
3662 | | - | |
3663 | | - | |
3664 | | - | |
3665 | | - | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
3666 | 3669 | | |
3667 | | - | |
3668 | | - | |
3669 | | - | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
3670 | 3676 | | |
3671 | | - | |
3672 | 3677 | | |
3673 | 3678 | | |
3674 | 3679 | | |
| |||
0 commit comments