🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Steven M. Schultz Mon, 11 Sep 1989 04:12
signal(3) bug +fix
#29
Author: 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;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads