Skip to content
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

Merged
merged 4 commits into from
Mar 31, 2021
Merged

Allow 64bit compilation #86

merged 4 commits into from
Mar 31, 2021

Conversation

DarkaMaul
Copy link
Contributor

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.

@CLAassistant
Copy link

CLAassistant commented Mar 31, 2021

CLA assistant check
All committers have signed the CLA.

@woodruffw
Copy link
Member

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 master and probably aren't expecting any architectural changes.

@DarkaMaul
Copy link
Contributor Author

Sure, no problem. I also reverted the default build for 32 bits to the build directory instead of build32.

@woodruffw
Copy link
Member

Much appreciated! The clang build on Windows has been broken for a while, so I'll ignore that and merge when the rest of the jobs go through. Thanks again.

@woodruffw woodruffw merged commit 9328f80 into trailofbits:master Mar 31, 2021
@m3lixir
Copy link
Contributor

m3lixir commented Apr 13, 2021

Closes #14 #67

SonicStark added a commit to SonicStark/aflgogogo that referenced this pull request Jul 19, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants