On 12/14/10 8:21 PM, hwri...@apache.org wrote:
Author: hwright
Date: Wed Dec 15 04:21:23 2010
New Revision: 1049414

URL: http://svn.apache.org/viewvc?rev=1049414&view=rev
Log:
Allow tests which cause segfaults to not disrupt the other tests in the C
testsuite.  This becomes useful when committing an XFailing test of a
segfault (which I will shortly do), or when a test starts segfaulting of
it's own accord.

This behavior is enabled by default, but can be disabled by passing
--allow-segfaults to the test, which should make for better debugging
of the cause of the segfault.

This patch uses setjmp() / longjmp() to accomplish the recovery from a SIGSEGV.
While I'd highly frown upon those function in general purpose use, I believe
this is an understandable exception.  Because it is so rare to use them,
my personal experience is limited, so review and corrections are of course
welcomed.

I've never seen setjmp/longjump used for this, but it's interesting.

One question, could you use sigsetjmp/siglongjmp instead of manually putting back disposition the to default with apr_signal? I guess you would use apr_signal after the sigsetjump in that case.

Blair

Reply via email to