Re: trouble trapping SEGV on 2.6.11.2 & 2.6.12-rc4

From: Clifford T. Matthews
Date: Tue May 24 2005 - 16:25:56 EST


>>>>> "Chris" == Chris Wright <chrisw@xxxxxxxx> writes:

Chris> 2.6 has been fixed... So your program (which happens to be
Chris> slightly buggy) no longer works as you expected. See
Chris> below.

Thanks for the quick response. Using sigsetjmp and siglongjmp makes
the program print two lines.

I read the setjmp / sigsetjmp documentation and misunderstood it.

I had already seen that if I inserted "signal (SIGSEGV, segv_handler)"
before the second setjmp (not sigsetjmp), the program (under 2.6
kernels) still would die.

I guess what happens there is that after coming back from the longjmp,
the error handler is still segv_handler, but the receipt of the SEGV
signal itself is blocked and if you take a SEGV when the receipt of
SEGV is blocked a program dies with a SEGV, even if you have a SEGV
handler.

--Cliff Matthews <ctm@xxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/