> So, afl_test.txt will have the test cases generated by the AFL. So, is there
> any way to see/verify the test cases generated in afl_test.txt?
Yes, examine the 'queue' subdirectory in the output directory. It will
contain all the generated test cases that AFL found interesting and is
using as seeds.
> The size of this file is constantly 0byte (can't see any test cases written to it).
That's not unusual, the file is constantly being overwritten.
> Also, I noticed you mentioned in the documentation that AFL can't detect
> crashes/hangs in child processes. So, is there any other way to detect
> crashes/hangs when it occurs in child processes?
Not within AFL, not in a portable way. The simplest solution is to
have a SIGCHLD handler that uses wait() to check whether the child
process was killed by a signal. This may interfere with some existing
child process handling in some cases; if so, you'd need to locate the
relevant wait / waitpid / waitid and add a check there.
When you detect that the child process died with SIGSEGV, SIGABRT, or
something like that, you can just call abort() and AFL will pick that
up.
/mz