You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 executing func_1.
198 is the compiled WASM
198_wasm-decompile.c: Decompiled result by wasm-decompile.
198_new.c: Extract the decompiled func_1 in 198_wasm-decompile.c and fix the syntax to make it re-compilable
Thank you
The text was updated successfully, but these errors were encountered:
Unfortunately we don't have anybody how has worked on or contributed to wasm-decompile in a long time. If you would like to improve it that would seems reasonable, or we could simple remove it.
Can I ask why you trying to do this kind of testing? If you want to compile your wasm program via C then we have the wasm2c tool which is actively maintained and used.
This is a research project that I worked on, comparing different decompilers. Unfortunately I am not the WASM expert on our team to be able to contribute to it. Personally would love to this tool being here though, and hopefully someone someday improves it. The concept of having readable decompile code is reasonable.
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:
wasm-decompile
, rewrite syntax and re-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 WASM198_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-compilableThank you
The text was updated successfully, but these errors were encountered: