Fix a bug in analyze_call().
The call arguments on call_indirect should not include the fixed callee argument. Add legalizer assertions to verify that signatures are actually valid after legalization. If not, we would get infinite legalizer loops.
This commit is contained in:
@@ -310,7 +310,7 @@ impl InstructionData {
|
||||
CallInfo::Direct(func_ref, &args.as_slice(pool))
|
||||
}
|
||||
&InstructionData::IndirectCall { sig_ref, ref args, .. } => {
|
||||
CallInfo::Indirect(sig_ref, &args.as_slice(pool))
|
||||
CallInfo::Indirect(sig_ref, &args.as_slice(pool)[1..])
|
||||
}
|
||||
_ => CallInfo::NotACall,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user