Commit a4d6719
committed
Pin object ivars while they are being copied in a hash
When transitioning an object to TOO_COMPLEX we copy all its
ivar in a table, but if GC (and compaction) trigger in the middle
of the transition, the old `iv_ptr` might still be the canonical
ivar list and will be updated by the GC, but the reference we
copied in the table will be outdated.
So we must pin these reference until they are all copied and
the object `iv_ptr` is pointing to the table.
To do this I use a custom TypedData that simply mark the new
table with `rb_mark_tbl` so references are pinned.
.1 parent 8f1ab1c commit a4d6719
3 files changed
+36
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
| 1425 | + | |
1426 | 1426 | | |
| 1427 | + | |
1427 | 1428 | | |
1428 | 1429 | | |
1429 | 1430 | | |
| |||
1647 | 1648 | | |
1648 | 1649 | | |
1649 | 1650 | | |
1650 | | - | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
1651 | 1673 | | |
1652 | 1674 | | |
| 1675 | + | |
1653 | 1676 | | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
1654 | 1684 | | |
1655 | 1685 | | |
1656 | 1686 | | |
| |||
0 commit comments