TermiNexus
f2d7b748ea
fix(func): 末尾收尾的可达性判据只认 _ctrl_merge_reachable(删掉“穷尽通配臂即不可达”的错误推断)
症状:includes/llvmlite/__types.vp::_TypePrintDepth 末句 match ty:(各臂只 snprintf 后 br 到 merge)被生成 match.end: unreachable;llc 不给可达 unreachable 生成任何指令 ⇒ 执行掉进布局紧随其后的同一 switch 跳转表,用上一条 snprintf 的返回值 3 当 tag 取 table[3]=Array 臂 ⇒ 把 Int 的 Bits(32) 当指针递归解引用 ⇒ AV at 0x20(裸 0xC0000005;ASan 下同一崩溃被转为 0x80000003 = -2147483645)
根因:last_is_ctrl and (_ctrl_merge_reachable == 0 or MatchHasWildcardArm(...)) 的“追加92”通配臂子句——穷尽性只保证匹配总能命中某臂,不保证各臂都终止且不 br 到 merge;而 _ctrl_merge_reachable 恰是逐臂真正 br end_bb 时才置 1 的精确信号(MatchGenMixin:717 写回)
修法:两处收尾判据(FuncGenDef 模块级函数 / ClassGenVTable 方法)都只在 _ctrl_merge_reachable == 0 时 build_unreachable;merge 可达时走既有分支正常收尾(void→ret void;无注解→ConstZero;有非 void 注解→fail-fast,不发明返回值)
删除随之失效的 MatchHasWildcardArm 与其私有 helper _IsWildcardPattern(全仓已无引用)
2026-09-28 12:41:04 +08:00
..
2026-09-27 13:12:22 +08:00
2026-09-28 12:41:04 +08:00
2026-09-27 16:02:04 +08:00
2026-09-28 12:41:04 +08:00
2026-09-27 14:45:28 +08:00
2026-09-27 12:30:47 +08:00
2026-08-28 04:50:09 +08:00
2026-09-27 14:45:28 +08:00
2026-09-23 17:41:49 +08:00
2026-09-23 16:09:32 +08:00
2026-09-27 19:18:16 +08:00
2026-09-27 14:45:28 +08:00
2026-09-23 16:09:32 +08:00
2026-09-23 16:09:32 +08:00
2026-09-27 13:12:22 +08:00
2026-09-28 12:41:04 +08:00
2026-09-27 23:58:15 +08:00
2026-09-26 19:27:23 +08:00
2026-09-27 17:56:51 +08:00
2026-09-23 17:41:49 +08:00