lkml.org 
[lkml]   [2005]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: trouble trapping SEGV on 2.6.11.2 & 2.6.12-rc4
>>>>> "Chris" == Chris Wright <chrisw@osdl.org> 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@ardi.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-24 23:28    [W:0.621 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site