Open luxinyi0105 opened 1 year ago
@luxinyi0105 do you have the source code that this program was compiled from? That'll make investigating a lot easier because we can pinpoint which parts of the program introduce the issue.
@luxinyi0105 do you have the source code that this program was compiled from? That'll make investigating a lot easier because we can pinpoint which parts of the program introduce the issue.
Thanks for your reply.
For testcase_1, the original C program is c_file_1.c
, the compilation results with Emscripten
is wasm_file_1.wasm
, and its wat format is wat_file_1.wat
.
We mutated the wat file to change all lt_s
with le_u
, and change all lt_u
with gt_u
. The result after mutation is mutated_file_1.wat
, and its wasm format is mutated_file_1.wasm
.
$ wasmer wasm_file_1.wasm
checksum = 26F04D2E
$ wasmer mutated_file_1.wasm
checksum = 0����\�����ih�ih�ih�ih�ih�ih�ih^N�����B�*��D+�\�������^N�������� '�=7���7������� �����v� 7����v�7���v�7���7���'�= ��������v��v�����������������vP�P��=�~I���P������������wasm_file_1.wasm��-+ 0X0x-0X+0X 0X-0x+0x 0xnaninfg_1056[i][j]g_888[i]g_1243[i]NANINFg_1199g_789g_279g_69g_19g_419g_1109g0
For testcase_2, the original C program is c_file_2.c
, the compilation results with Emscripten
is wasm_file_2.wasm
, and its wat format is wat_file_2.wat
.
We mutated the wat file to change all lt_u
with gt_s
, and change all le_s
with gt_s
. The result after mutation is mutated_file_2.wat
, and its wasm format is mutated_file_2.wasm
.
$ wasmer wasm_file_2.wasm
checksum = 47062B32
$ wasmer mutated_file_2.wasm
checksum =
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Feel free to reopen the issue if it has been closed by mistake.
Describe the bug
While executing the given wasm files with wasmer and some other wasm runtimes, such as wasmtime and wasmedge, the results are different.
Expected behavior
We believe that the "expected behaviour" should be to not output anything.
The reason is that using other wasm runtime tools, such as wasmtime and wasmedge, to execute the same test case results in nothing being output.
Actual behavior
Additional context
wasm_file_2.wasm in zip has similar problem, the distinction is that executing it with wasmer only outputs
checksum =
without any additional garbled code.