signal(3) bug +fix
Steven M. Schultz
sms at wlv.imsd.contel.com
Mon Sep 11 14:12:56 AEST 1989
Subject: signal(3) misdeclares mask array
Index: lib/libc/gen/signal.c 2.10BSD
Description:
The signal(3) routine has a long vs. int bug. signal masks
are 32 bits long rather than 16.
Repeat-By:
Examination.
The thing which drew attention to this bug was that the generated
code showed a "sxt" being generated rather than a true double
word move.
Fix:
Apply the following patch to /usr/src/lib/libc/gen/signal.c, recompile
using the guidlines in the Makefile and insert in to the c libraries.
Or, recompile the entire C library, but that seems a bit severe.
*** signal.c.old Sun Mar 9 19:56:54 1986
--- signal.c Sun Sep 10 20:51:09 1989
***************
*** 18,24 ****
int s, (*a)();
{
struct sigvec osv, sv;
! static int mask[NSIG];
static int flags[NSIG];
sv.sv_handler = a;
--- 18,24 ----
int s, (*a)();
{
struct sigvec osv, sv;
! static long mask[NSIG];
static int flags[NSIG];
sv.sv_handler = a;
More information about the Comp.bugs.2bsd
mailing list