-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack popping issue: Index out of bounds #31
Comments
Using the opcode tool of etherscan, mulUnderflow pushes only one value on the stack (intentionally malformed input?):
vs
|
Checking in the yellow paper, this is a situation called In Py-EVM this is called In Nimbus Additionally, this is an expected exception, I'm not sure how to automatically create {
"mulUnderFlow" : {
"_info" : {
"comment" : "",
"filledwith" : "cpp-1.3.0+commit.6e0ce939.Linux.g++",
"lllcversion" : "Version: 0.4.18-develop.2017.9.25+commit.a72237f2.Linux.g++",
"source" : "src/VMTestsFiller/vmArithmeticTest/mulUnderFlowFiller.json",
"sourceHash" : "c4dc43a2d2480a375b5f4cde0ff0b1059f36577d7c555b2ee92db62aad36aea2"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x0100",
"currentGasLimit" : "0x0f4240",
"currentNumber" : "0x00",
"currentTimestamp" : "0x01"
},
"exec" : {
"address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "0xcd1722f2947def4cf144679da39c4c32bdc35681",
"code" : "0x600102600155",
"data" : "0x",
"gas" : "0x0186a0",
"gasPrice" : "0x5af3107a4000",
"origin" : "0xcd1722f2947def4cf144679da39c4c32bdc35681",
"value" : "0x0de0b6b3a7640000"
},
"pre" : {
"0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "0x0de0b6b3a7640000",
"code" : "0x600102600155",
"nonce" : "0x00",
"storage" : {
}
}
}
}
} |
* Stack underflow: Add failing test to catch #31 * ensurePop, use proc instead of template + add comment for future refactoring of popInternal * Check stack underflows before popping values * run json tests again
In some 2 specific cases:
tests/fixtures/VMTests/vmArithmeticTest/mulUnderFlow.json
tests/fixtures/VMTests/vmArithmeticTest/sdiv_dejavu.json
popping the stack eads to an out-of-bounds exception.
Traceback
The text was updated successfully, but these errors were encountered: