Commit 07c8040
fix(gc): the root-dominance symbol scan must accept the C-unwind ABI (#8207)
* fix(gc): the root-dominance symbol scan must accept the C-unwind ABI
`gc-root-dominance` and `gc-root-dominance-statepoints` are red on main:
error: POLL_CAPABLE_RUNTIME entries that name no runtime symbol:
js_closure_call2
`js_closure_call2` is a real, exported runtime symbol. What changed is its ABI
string: it is declared `extern "C-unwind"`, and `runtime_symbols` scans for
`extern "C" fn js_*` only. So the audit concluded the entry named nothing.
The audit's own message warns against the wrong repair — "do not just delete
it, or the audit goes green and the hole stays" — and that applies here: the
entry is correct, the scanner is blind.
`"C-unwind"` is a distinct ABI string but the SAME exported C symbol, and the
runtime uses it for every entry point a JS exception may unwind through. Today
that is 18 symbols, and they are not incidental: `js_throw`, the entire
`js_native_call_method*` dispatch family, the `js_typed_feedback_native_call_*`
paths, and `js_closure_call2` — precisely the allocating, poll-capable calls
this analysis exists to reason about. Every consumer of `runtime_symbols` was
under-counting them, so the blindness was never limited to the one phantom that
made it visible.
Accept both spellings. `runtime_symbols` goes from 3803 to 3821 exported
symbols, and the phantom clears.
All five audits the workflow runs pass: `--self-test`, `--audit-alloc-re`
(71 alternatives, all matched), `--audit-poll-capable` (137 entries, all
matched), `--audit-immovable-sources`, and `--audit-poll-reach` (1622 symbols
with an intra-runtime call edge, 386 matched by ALLOC_RE, none unlisted).
* chore(changelog): add fragment for #8207
---------
Co-authored-by: Ralph Küpper <ralph@skelpo.com>1 parent f2554be commit 07c8040
2 files changed
Lines changed: 31 additions & 1 deletion
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
664 | 672 | | |
665 | 673 | | |
666 | 674 | | |
| |||
0 commit comments