libsigsegv and responding to a stack overflow
We are attempting to test student code, and in an effort to automate the process, we'd like to detect if a student's code overflows the stack. I've met with some success using the libsigsegv library and its corresponding stackoverflow_install_handler. It works brilliantly, until the student's code blows the stack twice. For example, here's some sample output: [# ~]$ ledit ./interpreter -> (use solution) -> (fun 1 2) *** Stack overflow detected *** -> (fun 1 2) Signal -10 [# ~] The initial " * Stack overflow detected * " is the desirable output. After blowing the stack for the second time, all