Fix: ASSERT(stackmapNum % 2 == 0)

Signed-off-by: bdf1 <baodongfang@yeah.net>
This commit is contained in:
bdf1 2023-10-15 00:59:21 +10:00
parent 98aca2acce
commit db21da8c5f
2 changed files with 5 additions and 1 deletions

View File

@ -190,7 +190,6 @@ void ArkStackMapParser::ParseArkStackMap(const CallsiteHeader& callsiteHead, uin
LLVMStackMapType::OffsetType offsetType;
uint32_t offset = callsiteHead.stackmapOffset;
uint16_t stackmapNum = callsiteHead.stackmapNum;
ASSERT(stackmapNum % 2 == 0); // 2:base and derive
for (uint32_t j = 0; j < stackmapNum; j++) {
auto [regOffset, regOffsetSize, is_full] =
panda::leb128::DecodeSigned<LLVMStackMapType::SLeb128Type>(ptr + offset);

View File

@ -66,4 +66,9 @@ for (let v316:number = 0; v316 < 5; v316++) {
f230();
}
// case7: stackmapNum % 2
let v39:any = 129 || C3;
Math.sign("12");
v39++;
print("compiler success");