diff options
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libevmasm/ConstantOptimiser.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog.md b/Changelog.md index 876182cc..bed3ab36 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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. diff --git a/libevmasm/ConstantOptimiser.cpp b/libevmasm/ConstantOptimiser.cpp index 9844ba3a..ae1a5643 100644 --- a/libevmasm/ConstantOptimiser.cpp +++ b/libevmasm/ConstantOptimiser.cpp @@ -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; |