Commit e5b127c
authored
Add missing stack map declaration for
`translate_array_new_elem` created a GC reference (array ref) via a libcall but
did not call `builder.declare_value_needs_stack_map()` on the result. This meant
the reference was not included in stack maps at subsequent safepoints, so if a
GC occurred, the reference became stale (leading to use-after-free within the GC
heap sandbox).array.new_elem (#12936)1 parent 0d66dff commit e5b127c
2 files changed
Lines changed: 29 additions & 1 deletion
File tree
- crates/cranelift/src
- tests/misc_testsuite/gc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2766 | 2766 | | |
2767 | 2767 | | |
2768 | 2768 | | |
2769 | | - | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
2770 | 2772 | | |
2771 | 2773 | | |
2772 | 2774 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments