AFLplusplus / qemu-libafl-bridge

A patched QEMU that exposes an interface for LibAFL-based fuzzers
Other
59 stars 33 forks source link

[WIP] Fix build for ARM target #4

Closed f0rki closed 2 years ago

f0rki commented 2 years ago

Currently, does not seem to build for the ARM target, and probably also not aarch64, due to a copy-paste error:

../target/arm/translate.c: In function ‘op_s_rri_rot’:
../target/arm/translate.c:5543:40: error: ‘tmp2’ undeclared (first use in this function); did you mean ‘tmp1’?
 5543 |       libafl_gen_cmp(s->pc_curr, tmp1, tmp2, MO_32);
      |                                        ^~~~
      |                                        tmp1

This seems to fix the build. However, I am not sure the current code makes sense, since it seems to be a comparison with a (possibly) rotated immediate value. Not sure there need to be cmplog hooks placed on that?

andreafioraldi commented 2 years ago

I missed this PR, merging now