wasm loader: Fix pop invalid offset count when stack top is ANY (#3516)

In wasm_loader_pop_frame_offset, when the stack is in polymorphic state
and the stack top operand is VALUE_TYPE_ANY, if we popping I64/F64
operand, we should pop one offset but not two offsets.

The issue was reported in #3513 and #3514.
This commit is contained in:
Wenyong Huang
2024-06-14 16:22:08 +08:00
committed by GitHub
parent ad5d31b9b0
commit d3e89895be
5 changed files with 83 additions and 44 deletions

View File

@ -1722,6 +1722,38 @@
"stdout content": "WASM module load failed: data count and data section have inconsistent lengths",
"description": "Check data segment count"
}
},
{
"deprecated": false,
"ids": [
3513
],
"runtime": "iwasm-default-wasi-disabled",
"file": "iwasm_poc_04.wasm",
"mode": "fast-interp",
"options": "-f main",
"argument": "",
"expected return": {
"ret code": 0,
"stdout content": "",
"description": "no sanitizer 'heap-buffer-overflow'"
}
},
{
"deprecated": false,
"ids": [
3514
],
"runtime": "iwasm-default-wasi-disabled",
"file": "iwasm_poc_05.wasm",
"mode": "fast-interp",
"options": "-f main",
"argument": "",
"expected return": {
"ret code": 0,
"stdout content": "",
"description": "no sanitizer 'heap-buffer-overflow'"
}
}
]
}