> I have a llvm sanitizer (say, address sanitizer) instrumented binary and it
> will generate warnings when you run with the right input.
The only thing that AFL interprets as a crash is a crash (i.e.,
termination of a process with a signal).
AFL has some special code for ASAN (-fsanitize=address) and MSAN
(-fsanitize=memory), setting environmental variables so that they
"crash" (call abort()) when they detect a violation. It also disables
the detection of some less helpful violations, such as malloc()
returning NULL or memory not being freed - although you can override
this.
For other types of sanitizers or other types of issues, this may be
something that needs to be set manually.
> But does AFL considers these as crashes or hangs? Or is it recorded anywhere
> else?
See above. AFL doesn't keep stdout / stderr / any other logs for
individual executions.
> May I know what I have to do to invoke the "crash" when using address/memory
> sanitizer? Or will it be called by default?
Sorry, not sure I follow; what are you trying to accomplish? As
mentioned, when using ASAN or MSAN with AFL, they will automatically
"crash" when encountering a violation such as access to uninitialized
memory. If you're using ASAN or MSAN, you don't need to do anything
else.
> I mean to ask if
> AFL avoids the log file creation by sanitizers, even after passing the flag
> for it explicitly to generate logs to a specific folder?
It doesn't disable that, but I don't recommend turning it on. It's not
going to produce the results you expect and it will slow things down
and risk missing some of the crashes.
/mz
--
You received this message because you are subscribed to the Google Groups "afl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to afl-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to afl-users+...@googlegroups.com.
afl-clang-fast -fsanitize=thread -fno-stack-protector thread2.c
TSAN_OPTIONS=abort_on_error=1:symbolize=0 afl-fuzz -m none -i ./test_thread/ -o ./results/ ./a.out
thanks
Hi Nishh,u mean the 2 @@ signs at the end of afl-fuzz and did u use the following commands for TSAN in linux.
afl-clang-fast -fsanitize=thread -fno-stack-protector thread2.c
TSAN_OPTIONS=abort_on_error=1:symbolize=0 afl-fuzz -m none -i ./test_thread/ -o ./results/ ./a.out
thanks