From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Ulrich Weigand Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix signull test case Date: Fri, 21 May 2004 17:10:00 -0000 Message-id: <40AE2E40.6030009@gnu.org> References: <200405201330.PAA24916@faui1d.informatik.uni-erlangen.de> X-SW-Source: 2004-05/msg00636.html Hello, the signull.exp test case fails when running under a 2.6 kernel, because it uses longjmp to leave a SIGSEGV handler. This results in the signal remaining blocked for the rest of program execution, and the second segmentation violation triggered by the test case simply terminates the program. The fix is to use siglongjmp. Hmm, checking POSIX, it was left unspecified. I choose to read the wrong man page :-( Also, the test case uses 'signal' to install the signal handler; according to POSIX it is undefined whether this routine installs the handler with the 'one-shot' property or not. (Apparently, on BSD-like systems 'one-shot' is the default.) Very very old systems. Modern BSD systems leave the signal in place. Thus, I've also changed the test case to use sigaction instead, to make sure the handler remains active across multiple invocations. (This isn't currently an actual problem on Linux systems -- if you prefer I can remove this part.) Tested on s390-ibm-linux and s390x-ibm-linux, fixes one test suite failure. Andrew