🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.2bsd
Article #29

signal(3) bug +fix

#29
From: Steven M. Schultz
Date: Mon, 11 Sep 1989 04:12
38 lines
1505 bytes
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;
Technical Details
Message-ID: <36430@wlbr.IMSD.CONTEL.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!hacgate!wlbr!wlv!sms

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!hacgate!wlbr!wlv!sms
From: sms@wlv.imsd.contel.com (Steven M. Schultz)
Newsgroups: comp.bugs.2bsd
Subject: signal(3) bug +fix
Keywords: long int
Message-ID: <36430@wlbr.IMSD.CONTEL.COM>
Date: 11 Sep 89 04:12:56 GMT
Sender: news@wlbr.IMSD.CONTEL.COM
Reply-To: sms@wlv.imsd.contel.com (Steven M. Schultz)
Organization: Contel Federal Systems
Lines: 38