Closed DennyDai closed 4 years ago
Should binaries be added here, rather than in the binaries repo? I see that many are already here, but in the interest of not having our repos blow up to hundreds of megabytes, it might be preferable to commit them there.
Also, I see nose being used. It would be preferable to use standard-library unittest or python's built in asserts in place of nose, as we are hoping to eventually drop that dependency.
@twizmwazin so, would you move the binaries to angr/binary? I think it makes sense.
Also, I see nose being used. It would be preferable to use standard-library unittest or python's built in asserts in place of nose, as we are hoping to eventually drop that dependency.
@twizmwazin Thank you for the advise, I've replaced the uses of nose with python's built in asserts statement.
@twizmwazin so, would you move the binaries to angr/binary? I think it makes sense.
I think moving binaries to the binaries repo would make sense, and would be consistent with other angr projects. To load them, we use the assumption that the binaries repo is cloned into the same folder patcherex is cloned into.
I've moved binaries to angr/binaries https://github.com/angr/binaries/pull/54
@twizmwazin do you think this is good to be merged now?
A few notes:
unittest.main()
With those minor tweaks, lgtm
@twizmwazin Thank you for your review. I've fixed them.
add tests for x86
Tested on Ubuntu 18.04 LTS, binary compiled with gcc 7.5.0.
*It runs properly on the local x86 machine, but segfault will appear when using qemu-i386 to run the patched binary file. **Add{RO, RW, RWInit}DataPatch will fail when adding data of length 10,000.
fix clang cmd
fix inconsistent types of variable compile_flags https://github.com/angr/patcherex/blob/feat/ezpz/patcherex/patches.py#L73 https://github.com/angr/patcherex/blob/feat/ezpz/patcherex/utils.py#L740