wabt
wabt copied to clipboard
wasm-decompile decompile error
Hi wabt team,
Recently I have been testing the decompile tool chain of WebAssembly. This is conducted by comparing the results of a C program:
- compile into WASM, decompile with
wasm-decompile
, rewrite syntax and re-compile into native binary. - directly compile into native binary.
A few execution discrepancies are discovered during this process.
One is as the displayed code snipped. It seems like the recovered data flow is incorrect.
May I ask if this is an implementation error, or am I missing anything here?
Attaching the files related to this report. 198.zip
-
198.c
: A C program generated with csmith. The goal is to compare the final hash value after executingfunc_1
. -
198
is the compiled WASM -
198_wasm-decompile.c
: Decompiled result by wasm-decompile. -
198_new.c
: Extract the decompiledfunc_1
in198_wasm-decompile.c
and fix the syntax to make it re-compilable
Thank you