Commit e4bea56
committed
Lock VM in fork hooks
If we are using multiple Ractors, other Ractors may allocate objects after
rb_gc_impl_before_fork is ran because it does not lock the VM. This can cause
the GC to be in a bad state since rb_gc_impl_before_fork may have terminated
GC threads so a GC cannot run until rb_gc_impl_after_fork is ran.1 parent fc69d58 commit e4bea56
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
1045 | 1047 | | |
1046 | 1048 | | |
1047 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1048 | 1054 | | |
1049 | 1055 | | |
1050 | 1056 | | |
1051 | 1057 | | |
1052 | 1058 | | |
1053 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
1054 | 1062 | | |
| 1063 | + | |
| 1064 | + | |
1055 | 1065 | | |
1056 | 1066 | | |
1057 | 1067 | | |
| |||
0 commit comments