HexHive / retrowrite

RetroWrite -- Retrofitting compiler passes through binary rewriting
Other
655 stars 78 forks source link

Segmentation fault in reassembled binary #23

Open Liblor opened 3 years ago

Liblor commented 3 years ago

Another possible bug.

Issue:

$ ./08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_ref
$ echo $?
0

$ ./08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_mod
Segmentation fault (core dumped)

Build:

$ clang -O2 -fPIC -fPIE -pie 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12.c 08e6e84cab2284e35e4808f1891290b0519f1e3f.ll -o 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_ref
$ retrowrite 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_ref 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_ref.s
$ clang 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_ref.s -o 08e6e84cab2284e35e4808f1891290b0519f1e3f_GlobalDCE1061_12_bin_mod

reproducible.tar.gz