Merge pull request #5517 from ethereum/nondeterminismBoost

Fix nondeterminism bug related to boost version.
This commit is contained in:
chriseth 2018-11-27 16:00:43 +01:00 committed by GitHub
commit bc7cb301e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ Bugfixes:
* Assembly output: Do not mix in/out jump annotations with arguments.
* Code Generator: Annotate jump from calldata decoder to function as "jump in".
* Type Checker: Properly detect different return types when overriding an external interface function with a public contract function.
* Optimizer: Fix nondeterminism bug related to the boost version and constants representation. The bug only resulted in less optimal but still correct code because the generated routine is always verified to be correct.
Build System:
* Emscripten: Upgrade to Emscripten SDK 1.37.21 and boost 1.67.

View File

@ -193,7 +193,7 @@ AssemblyItems ComputeMethod::findRepresentation(u256 const& _value)
bigint bestGas = gasNeeded(routine);
for (unsigned bits = 255; bits > 8 && m_maxSteps > 0; --bits)
{
unsigned gapDetector = unsigned(_value >> (bits - 8)) & 0x1ff;
unsigned gapDetector = unsigned((_value >> (bits - 8)) & 0x1ff);
if (gapDetector != 0xff && gapDetector != 0x100)
continue;