Fix an updateTrackedEffects bug for InterpOne
InterpOne was not properly tracking its effects on the stack offset. The return-type-means-an-extra-push thing was compensated for in both hhbctranslator and tracebuilder.
Esse commit está contido em:
@@ -983,7 +983,7 @@ void TraceBuilder::genNativeImpl() {
|
||||
}
|
||||
|
||||
SSATmp* TraceBuilder::genInterpOne(uint32_t pcOff,
|
||||
uint32_t stackAdjustment,
|
||||
int32_t stackAdjustment,
|
||||
Type resultType) {
|
||||
return gen(InterpOne,
|
||||
resultType,
|
||||
@@ -1247,7 +1247,7 @@ void TraceBuilder::updateTrackedState(IRInstruction* inst) {
|
||||
int64_t stackAdjustment = inst->getSrc(3)->getValInt();
|
||||
Type resultType = inst->getTypeParam();
|
||||
// push the return value if any and adjust for the popped values
|
||||
m_spOffset += ((resultType == Type::None ? 0 : 1) - stackAdjustment);
|
||||
m_spOffset += -stackAdjustment;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
SSATmp* genIterNextK(uint32_t iterId, uint32_t valLocalId, uint32_t keyLocalId);
|
||||
SSATmp* genIterFree(uint32_t iterId);
|
||||
|
||||
SSATmp* genInterpOne(uint32_t pcOff, uint32_t stackAdjustment,
|
||||
SSATmp* genInterpOne(uint32_t pcOff, int32_t stackAdjustment,
|
||||
Type resultType);
|
||||
Trace* getExitSlowTrace(uint32_t bcOff,
|
||||
int32_t stackDeficit,
|
||||
|
||||
@@ -3161,7 +3161,8 @@ TranslatorX64::enterTC(SrcKey sk, TCA start) {
|
||||
start = TCA(0xbee5face);
|
||||
}
|
||||
|
||||
TRACE(4, "enterTC: request(%s) args: %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 "\n",
|
||||
TRACE(2, "enterTC: request(%s) args: %" PRIx64 " %" PRIx64 " %"
|
||||
PRIx64 " %" PRIx64 " %" PRIx64 "\n",
|
||||
reqName(info.requestNum),
|
||||
info.args[0], info.args[1], info.args[2], info.args[3],
|
||||
info.args[4]);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário