[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1049414 - /subversion/trunk/subversion/tests/svn_test_main.c

From: Blair Zajac <blair_at_orcaware.com>
Date: Tue, 14 Dec 2010 21:17:12 -0800

On 12/14/10 8:21 PM, hwright_at_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
Received on 2010-12-15 06:17:51 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.