Trying to build a debugger in C for fuzzing.
Basically in linux, I just want to start a process via fork and then execve(), then monitor this process to see if it crashes after 1 second.
On linux, is this done via creating the process then monitoring the SIGNALs it generates for anything that looks like a crash? Or is it about monitoring the application and? I’m not sure.
Use the
ptrace(2)system call:The signals you should be interested in, regarding to the process having crashed are
SIGSEGV(restricted memory access),SIGBUS(unaligned data access),SIGILL(illegal instruction),SIGFPE(illegal floating-point operation), etc.