| Title: | On Unix, signal handler is not installed correctly. |
| Status: | closed |
| Priority: | essential |
| Assigned user: | David Jones |
| Organization: | Ravenbrook |
| Description: | On 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. |
| Analysis: | Consider 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: sigemptyset(&sa.sa_mask); 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 found: | unknown |
| Observed in: | 1.107.0 |
| Created by: | David Jones |
| Created on: | 2007‑03‑02 10:43:39 |
| Last modified by: | Richard Brooksby |
| Last modified on: | 2012‑08‑15 13:48:54 |
| History: | 2007-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. |
Generated at 2013-05-22 04:33:18 by $Id: //info.ravenbrook.com/infosys/cgi/issue.cgi#476 $
Copyright © Ravenbrook Limited. This document is provided "as is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this document. You may not duplicate or reproduce this document in any form without the express permission of the copyright holder.