*BSD News Article 12196


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!data.nas.nasa.gov!eos!agate!howland.reston.ans.net!wupost!newsfeed.rice.edu!rice!news.Rice.edu!rich
From: rich@Rice.edu (Richard Murphey)
Subject: Re: cvs 1.3 bugfix
In-Reply-To: sommerfeld@apollo.hp.com's message of Wed, 3 Mar 1993 23:05:47 GMT
Message-ID: <RICH.93Mar3233616@omicron.Rice.edu>
Sender: news@rice.edu (News)
Reply-To: Rich-Murphey@Rice.edu
Organization: Department of Electrical and Computer Engineering, Rice
	University
References: <RICH.93Mar3114046@omicron.Rice.edu>
	<SOMMERFELD.93Mar3180839@blatt.apollo.hp.com>
Date: Thu, 4 Mar 1993 05:36:16 GMT
Lines: 39

In article <SOMMERFELD.93Mar3180839@blatt.apollo.hp.com> sommerfeld@apollo.hp.com (Bill Sommerfeld) writes:
   In article <RICH.93Mar3114046@omicron.Rice.edu> rich@Rice.edu (Richard Murphey) writes:

      Upon invocation, cvs just spins, consuming CPU time.  The patch below
      fixes this problem.

      For the << operator, the result is undefined if the right hand operand
      is greater than the width of the left hand operand.

      Rich

[patch to cvs]

   I think this is a bug in the sigismember macro, not in cvs....

Yep, the posix spec claims sigismember() should return -1 if signo is
out of range.  Perhaps this would be sufficient.  Rich


*** signal.h.orig	Wed Mar  3 23:17:08 1993
--- signal.h	Wed Mar  3 23:19:53 1993
***************
*** 108,114 ****
  #define sigfillset(set)		( *(set) = ~(sigset_t)0, 0 )
  #define sigaddset(set, signo)	( *(set) |= 1 << ((signo) - 1), 0)
  #define sigdelset(set, signo)	( *(set) &= ~(1 << ((signo) - 1)), 0)
! #define sigismember(set, signo)	( (*(set) & (1 << ((signo) -
1))) != 0)
  
  /*
   * Signal vector "template" used in sigaction call.
--- 108,114 ----
  #define sigfillset(set)		( *(set) = ~(sigset_t)0, 0 )
  #define sigaddset(set, signo)	( *(set) |= 1 << ((signo) - 1), 0)
  #define sigdelset(set, signo)	( *(set) &= ~(1 << ((signo) - 1)), 0)
! #define sigismember(set, signo)	( ((signo < 0) || (signo >31)) ? -1 : (*(set) & (1 << ((signo) - 1))) != 0)
  
  /*
   * Signal vector "template" used in sigaction call.