mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-16 03:48:08 +00:00
additional test, if afl-as is called by afl-gcc/afl-clang (seen in OpenIndiana)
This commit is contained in:
4
Makefile
4
Makefile
@ -131,6 +131,8 @@ help:
|
|||||||
ifndef AFL_NO_X86
|
ifndef AFL_NO_X86
|
||||||
|
|
||||||
test_x86:
|
test_x86:
|
||||||
|
@echo "[*] Checking for the default compiler cc..."
|
||||||
|
@which $(CC) >/dev/null || ( echo; echo "Oops, looks like there is no compiler '"$(CC)"' in your path."; echo; echo "Don't panic! You can restart with '"$(_)" CC=<yourCcompiler>'."; echo; exit 1 )
|
||||||
@echo "[*] Checking for the ability to compile x86 code..."
|
@echo "[*] Checking for the ability to compile x86 code..."
|
||||||
@echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test1 || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 )
|
@echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test1 || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 )
|
||||||
@rm -f .test1
|
@rm -f .test1
|
||||||
@ -236,7 +238,7 @@ ifndef AFL_NO_X86
|
|||||||
|
|
||||||
test_build: afl-gcc afl-as afl-showmap
|
test_build: afl-gcc afl-as afl-showmap
|
||||||
@echo "[*] Testing the CC wrapper and instrumentation output..."
|
@echo "[*] Testing the CC wrapper and instrumentation output..."
|
||||||
unset AFL_USE_ASAN AFL_USE_MSAN AFL_CC; AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./$(TEST_CC) $(CFLAGS) test-instr.c -o test-instr $(LDFLAGS)
|
@unset AFL_USE_ASAN AFL_USE_MSAN AFL_CC; AFL_INST_RATIO=100 AFL_PATH=. ./$(TEST_CC) $(CFLAGS) test-instr.c -o test-instr $(LDFLAGS) 2>&1 | grep 'afl-as' >/dev/null || (echo "Oops, afl-as did not get called from "$(TEST_CC)". This is normally achieved by "$(CC)" honoring the -B option."; exit 1 )
|
||||||
./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
|
./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
|
||||||
echo 1 | ./afl-showmap -m none -q -o .test-instr1 ./test-instr
|
echo 1 | ./afl-showmap -m none -q -o .test-instr1 ./test-instr
|
||||||
@rm -f test-instr
|
@rm -f test-instr
|
||||||
|
@ -499,7 +499,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
clang_mode = !!getenv(CLANG_ENV_VAR);
|
clang_mode = !!getenv(CLANG_ENV_VAR);
|
||||||
|
|
||||||
if (isatty(2) && !getenv("AFL_QUIET")) {
|
if (!getenv("AFL_QUIET")) {
|
||||||
|
|
||||||
SAYF(cCYA "afl-as" VERSION cRST " by Michal Zalewski\n");
|
SAYF(cCYA "afl-as" VERSION cRST " by Michal Zalewski\n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user