evm2wasm icon indicating copy to clipboard operation
evm2wasm copied to clipboard

Endianness issue in bswap_m256

Open lrettig opened this issue 6 years ago • 2 comments

Logging this to track the conversation yesterday in gitter:

@axic Mar 21 18:38 very likely evm2was has endianess issues @hugo-dc Mar 21 18:52 i’ve just confirmed storage is the problem, fill the tests expecting "0x" : “0x0200000000000000000000000000000000000000000000000000000000000000” in storage, and the test case pass @jwasinger Mar 21 19:19 I have the fix. the endianness is being flipped by bswap_m256 : ;; generated by ./wasm/generateInterface.js\n(func $SSTORE (call $storageStore(call $bswap_m256 (get_global $sp))(call $bswap_m256 (i32.add (get_global $sp) (i32.const -32)))))

lrettig avatar Mar 22 '18 22:03 lrettig

@jwasinger are we sure all the endianness issues are fixed already?

lrettig avatar Apr 23 '18 12:04 lrettig

No, this was auto-closed by #202 which was merged 'as-is' (without fully fixing this issue)

jwasinger avatar Apr 23 '18 18:04 jwasinger