Commit 2a770131
2a770131dd74Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 1 file · ~1 modified
Description
codegen: fix sp_gc_mark_rbval typo in fiber poly-capture scan
A fiber capturing a poly (widened) variable emitted a scan call to the nonexistent sp_gc_mark_rbval, an undefined-reference link error. The function is sp_mark_rbval (as every other poly-mark site uses). Latent until promote mode produced poly fiber captures. Fixes i1007, fiber_capture_no_leak_to_sibling.
Co-Authored-By: Claude Opus 4.8 [email protected]
Details
- Commit
- 2a770131dd74
- Parent
- a7fc57ad28ab
src/codegen.cmodifiedView file
@@ -777,7 +777,7 @@
777777
LocalVar *lv = encl ? scope_local(encl, caps.v[i]) : NULL;778778
TyKind ct = lv ? lv->type : TY_POLY;779779
if (fiber_cap_needs_root(ct)) {780-
if (ct == TY_POLY) buf_printf(&g_proc_protos, " sp_gc_mark_rbval(_c->%s);\n", caps.v[i]);780+
if (ct == TY_POLY) buf_printf(&g_proc_protos, " sp_mark_rbval(_c->%s);\n", caps.v[i]);781781
else buf_printf(&g_proc_protos, " if (_c->%s) sp_gc_mark((void *)_c->%s);\n", caps.v[i], caps.v[i]);782782
}783783
}