This is a simple solution that uses clang name_of_bitcode.bc to
compile a native executable and compares its output with an executable
compiled from the source .c files.
With this, only the following files have problems where the executable
segfaults:
bitwise_IO.bc
bitwise_IO.opt2.bc
flipping_bits_game.bc
flipping_bits_game.opt.bc
flipping_bits_game.opt1.bc
pascal_matrix_generation.bc
pascal_matrix_generation.opt.bc
resistor_mesh.bc
resistor_mesh.opt.bc
run-length_encoding.bc
run-length_encoding.opt.bc
Notice that optimized bitcodes are not the source of the segfault since
the unoptimized ones crash as well.
For all other cases, the outputs are identical.
Requires pexpect.
Other solutions we tried where based on lli and wasmtime but where less
stable.
This is a simple solution that uses
clang name_of_bitcode.bc
to compile a native executable and compares its output with an executable compiled from the source.c
files.With this, only the following files have problems where the executable segfaults:
Notice that optimized bitcodes are not the source of the segfault since the unoptimized ones crash as well.
For all other cases, the outputs are identical.
Requires pexpect.
Other solutions we tried where based on lli and wasmtime but where less stable.