fix travis and fix logic

This commit is contained in:
van Hauser
2020-02-19 10:46:10 +01:00
parent 687b357b2d
commit 69898722cb
6 changed files with 14 additions and 6 deletions

View File

@ -26,6 +26,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
(which is pointless) to total execs per second (which is pointless) to total execs per second
- bugfix for dictionary insert stage count (fix via Google repo PR) - bugfix for dictionary insert stage count (fix via Google repo PR)
- added warning if -M is used together with custom mutators with _ONLY option - added warning if -M is used together with custom mutators with _ONLY option
- AFL_TMPDIR checks are now later and better explained if they fail
- llvm_mode InsTrim: no pointless instrumentation of 1 block functions - llvm_mode InsTrim: no pointless instrumentation of 1 block functions
- afl-clang-fast: - afl-clang-fast:
- show in the help output for which llvm version it was compiled for - show in the help output for which llvm version it was compiled for
@ -37,6 +38,8 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- experimental support for undefined behaviour sanitizer UBSAN - experimental support for undefined behaviour sanitizer UBSAN
(set AFL_USE_UBSAN=1) (set AFL_USE_UBSAN=1)
- the instrumentation summary output now also lists activated sanitizers - the instrumentation summary output now also lists activated sanitizers
- afl-as: added isatty(2) check back in
- added AFL_DEBUG (for upcoming merge)
- qemu_mode: - qemu_mode:
- persistent mode is now also available for arm and aarch64 - persistent mode is now also available for arm and aarch64
- CmpLog instrumentation for QEMU (-c afl-fuzz command line option) - CmpLog instrumentation for QEMU (-c afl-fuzz command line option)

View File

@ -498,7 +498,7 @@ int main(int argc, char** argv, char** envp) {
exit(1); exit(1);
} else if ((isatty(2) && !getenv("AFL_QUIET")) || !getenv("AFL_DEBUG")) { } else if ((isatty(2) && !getenv("AFL_QUIET")) || getenv("AFL_DEBUG") != NULL) {
#ifdef USE_TRACE_PC #ifdef USE_TRACE_PC
SAYF(cCYA "afl-clang-fast" VERSION cRST SAYF(cCYA "afl-clang-fast" VERSION cRST

View File

@ -145,7 +145,9 @@ bool AFLCoverage::runOnModule(Module &M) {
char be_quiet = 0; char be_quiet = 0;
if (isatty(2) && !getenv("AFL_QUIET")) { printf("DEBUG? %s\n", getenv("AFL_DEBUG"));
if ((isatty(2) && !getenv("AFL_QUIET")) || getenv("AFL_DEBUG") != NULL) {
SAYF(cCYA "afl-llvm-pass" VERSION cRST " by <lszekeres@google.com>\n"); SAYF(cCYA "afl-llvm-pass" VERSION cRST " by <lszekeres@google.com>\n");
@ -481,6 +483,7 @@ bool AFLCoverage::runOnModule(Module &M) {
} }
} }
printf ("BEQUIET!\n");
return true; return true;

View File

@ -510,7 +510,7 @@ int main(int argc, char** argv) {
clang_mode = !!getenv(CLANG_ENV_VAR); clang_mode = !!getenv(CLANG_ENV_VAR);
if (!getenv("AFL_QUIET")) { if ((isatty(2) && !getenv("AFL_QUIET")) || getenv("AFL_DEBUG") != NULL) {
SAYF(cCYA "afl-as" VERSION cRST " by Michal Zalewski\n"); SAYF(cCYA "afl-as" VERSION cRST " by Michal Zalewski\n");

View File

@ -380,7 +380,7 @@ int main(int argc, char** argv) {
} }
if (isatty(2) && !getenv("AFL_QUIET")) { if ((isatty(2) && !getenv("AFL_QUIET")) || getenv("AFL_DEBUG") != NULL) {
SAYF(cCYA "afl-cc" VERSION cRST " by Michal Zalewski\n"); SAYF(cCYA "afl-cc" VERSION cRST " by Michal Zalewski\n");
SAYF(cYEL "[!] " cBRI "NOTE: " cRST SAYF(cYEL "[!] " cBRI "NOTE: " cRST

View File

@ -65,6 +65,8 @@ unset AFL_PYTHON_MODULE
unset AFL_PRELOAD unset AFL_PRELOAD
unset LD_PRELOAD unset LD_PRELOAD
rm -rf in in2 out
export ASAN_OPTIONS=detect_leaks=0:allocator_may_return_null=1:abort_on_error=1:symbolize=0 export ASAN_OPTIONS=detect_leaks=0:allocator_may_return_null=1:abort_on_error=1:symbolize=0
# on OpenBSD we need to work with llvm from /usr/local/bin # on OpenBSD we need to work with llvm from /usr/local/bin
@ -332,7 +334,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
CODE=1 CODE=1
} }
rm -f test-compcov.instrim test.out rm -f test-compcov.instrim test.out
AFL_LLVM_LAF_SPLIT_SWITCHES=1 AFL_LLVM_LAF_TRANSFORM_COMPARES=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 ../afl-clang-fast -o test-compcov.compcov test-compcov.c > /dev/null 2> test.out AFL_DEBUG=1 AFL_LLVM_LAF_SPLIT_SWITCHES=1 AFL_LLVM_LAF_TRANSFORM_COMPARES=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 ../afl-clang-fast -o test-compcov.compcov test-compcov.c > /dev/null 2> test.out
test -e test-compcov.compcov && { test -e test-compcov.compcov && {
grep -Eq " [3-9][0-9] location" test.out && { grep -Eq " [3-9][0-9] location" test.out && {
$ECHO "$GREEN[+] llvm_mode laf-intel/compcov feature works correctly" $ECHO "$GREEN[+] llvm_mode laf-intel/compcov feature works correctly"
@ -346,7 +348,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
} }
rm -f test-compcov.compcov test.out rm -f test-compcov.compcov test.out
echo foobar.c > whitelist.txt echo foobar.c > whitelist.txt
AFL_LLVM_WHITELIST=whitelist.txt ../afl-clang-fast -o test-compcov test-compcov.c > test.out 2>&1 AFL_DEBUG=1 AFL_LLVM_WHITELIST=whitelist.txt ../afl-clang-fast -o test-compcov test-compcov.c > test.out 2>&1
test -e test-compcov && { test -e test-compcov && {
grep -q "No instrumentation targets found" test.out && { grep -q "No instrumentation targets found" test.out && {
$ECHO "$GREEN[+] llvm_mode whitelist feature works correctly" $ECHO "$GREEN[+] llvm_mode whitelist feature works correctly"