MPS issue job001635

TitleOn Unix, signal handler is not installed correctly.
Assigned userDavid Jones
DescriptionOn Unix, signal handler is not installed correctly.

On many Unix systems sigaction is used to install the signal handler
that we use for catching protection faults. See prot*.c

At least on DIGITAL UNIX (aka OSF/1, Tru64) and Solaris this handler is
not installed correctly. The sa_mask field of the struct sigaction
that is passed to sigaction(0) not initialised.
AnalysisConsider the Solaris ProtSetup code, protso.c:

 struct sigaction sa;
 int result;

 sa.sa_handler = sigHandle;
 sa.sa_flags = SA_SIGINFO;

 result = sigaction(SIGSEGV, &sa, &sigNext);

struct sigaction has another field, sa_mask, which should be
initialised. This is fixed in FreeBSD:


The probably effect of this bug is that the signal mask for the signal
handler has some extra signals masked out. Since we never expect to
spend a large amount of time in our signal handler, this probably isn't
a huge problem.

There should be more common code between the Unix systems in any case.

2007-03-09 DRJ:

Change 161902 includes the sigemptyset code in protsgix.c; this
code is only used on Intel Darwin at the moment, but should
become more common in future.
How foundunknown
Observed in1.107.0
Created byDavid Jones
Created on2007-03-02 10:43:39
Last modified byRichard Brooksby
Last modified on2012-08-15 13:48:54
History2007-03-02 DRJ Created.


Change Effect Date User Description
178908 closed 2012-08-12 23:27:35 Richard Brooksby Removing obsolete platforms:
LII3EG Linux on i386 with EGCS
LIPPGC Linux on POWER with GCC
S7PPMW Mac System 7 on PowerPC with Metrowerks Codewarrior
SOS8CX Solaris on SPARC 8 with cxref
SOS8GC Solaris on SPARC 8 with GCC
SOS8GP Solaris on SPARC 8 with GCC and gprof
SOS9SC Solaris on SPARC 9 with SunPro C
XCPPGC Mac OS X on PowerPC with GCC
161902 open 2007-03-08 21:50:28 David Jones MPS: Protection for Intel Darwin. Hopefully cross-platform.