-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow 64bit compilation #86
Conversation
Thanks @DarkaMaul! This looks reasonable to me. One request: could you flip the defaults around so that x86-32 remains the default? I'm not opposed to making x86-64 the default at some point in the future, but I know for a fact that a lot of people currently build from |
Sure, no problem. I also reverted the default build for 32 bits to the |
Much appreciated! The |
New implementation had been tested with all fuzz scripts in *./examples* since the last commit. Bugs found and fixed in the new implementation: build.sh - `info` method has been [removed from networkx 3](https://networkx.org/documentation/stable/release/release_3.0.html). *add_edges.py* and *distance.py* give `AttributeError: module 'networkx' has no attribute 'info'`. - Incorrect work directory when compling aflgo. Readme.md - Should also install older versions of networkx. - Should remind users for libxml2 in another level-1 title. - Should info users that the dependencies aren't installed by fuzzing scripts. afl-2.57b/Makefile - Missing link of libm (for math.h) instrument/aflgo-clang.c - Incorrect construction of obj_path instrument/aflgo-runtime.c - Incorrect relative include path instrument/Makefile - Missing "./" distance/distance_calculator/CMakeLists.txt - Incorrect file extension distance/gen_distance_orig.sh - Redundant `set -euo pipefail`. The script has its own error handling processes such as `|| FAIL=1`. - Inconsistent behavior with *gen_distance_fast.py* because of `find`. The python script uses `Path.glob`, which won't search recursively without "**/". However GNU find searches the whole directory tree. So use `-maxdepth` to constrain it. examples - All scripts should fit new *gen_distance_orig.sh* (consistent with *gen_distance_fast.py*) and stop abusing $SUBJECT everywhere :( - *KTY_Pretty_Printer.sh*, *LMS.sh* and *Palindrome.sh*: trailofbits/cb-multios#86 force it to use clang in cmake/32.cmake and cmake/64.cmake, making $CC and $CXX useless. - *libming-CVE-2018-8962.sh* and *libming-CVE-2018-8962.sh*: Without "-fcommon" the linker called by clang will fail. See squaresLab/security-repair-benchmarks#19 - *libxml2-ef709ce2.sh*: Should undo `set -e` because `cp $SUBJECT/test/dtd* in` needs to ignore directory *$SUBJECT/test/dtds* as normal.
Hi,
This pull request is heavily inspired from #67 and introduce the compilation of the challenges for both 32 and 64 bits (64 is the new default).
Due to a lack of time, I only tested on a Debian with both clang and gcc and it worked fine.
I tried to keep changes minimals, feel free to review/edit.