fix: 控制流逃出计数读越界防御,无 ext 字的返回安全降级

This commit is contained in:
2026-08-16 15:02:04 +08:00
parent 89f6b98b65
commit 649ea44e71
2 changed files with 9 additions and 5 deletions
+2 -5
View File
@@ -62,10 +62,7 @@ fn spill_unspill_roundtrip() {
#[test]
fn frame_boundary_parent_spill_survives_call() {
let child = int_module(
vec![
Inst::load_const(Operand::Reg(3), 0),
Inst::new(OpCode::RETURN, Operand::Reg(3), Operand::None, Operand::None),
],
vec![Inst::load_const(Operand::Reg(3), 0), Inst::ret(Operand::Reg(3), 0, 0)],
99,
4,
Vec::new(),
@@ -90,7 +87,7 @@ fn nested_call_both_spill() {
vec![
Inst::load_const(Operand::Reg(3), 0),
Inst::inst_spill(Operand::Reg(3), 0),
Inst::new(OpCode::RETURN, Operand::Reg(3), Operand::None, Operand::None),
Inst::ret(Operand::Reg(3), 0, 0),
],
99,
4,