Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 1997 17:20:50 +0200
From:      lada@ws6303.gud.siemens.at (marino.ladavac@siemens.at)
To:        freebsd-bugs@FreeBSD.ORG, hackers@FreeBSD.ORG, gurney_j@resnet.uoregon.edu
Subject:   Re: Bug in malloc/free
Message-ID:  <199709191520.RAA10438@ws6423.gud.siemens.at>

next in thread | raw e-mail | index | archive | help
> From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 19 16:54:54 MET 1997
> Date: Fri, 19 Sep 1997 07:15:18 -0700
> From: John-Mark Gurney <gurney_j@efn.org>
> To: freebsd-bugs@FreeBSD.ORG, hackers@FreeBSD.ORG
> Subject: Re: Bug in malloc/free
> Mime-Version: 1.0
> X-Operating-System: FreeBSD 2.2.1-RELEASE i386
> X-Pgp-Fingerprint: B7 EC EF F8 AE ED A7 31  96 7A 22 B3 D8 56 36 F4
> X-Files: The truth is out there
> X-Url: http://resnet.uoregon.edu/~gurney_j/
> X-Loop: FreeBSD.org
> 
> marino.ladavac@siemens.at scribbled this message on Sep 19:
> > > >
> > > >Flushing in abort() should be safe because abort() is not among the
> > > >functions that are safe to call from a signal handler :-).
> > > 
> > > Bummer.
> > > 
> > > So what should I do in malloc when I realize that continuing doesn't
> > > make sense ?
> > > 
> > > 	kill (diesig, getpid()); ?
> > > 	for which value of diesig ?
> > 
> > 	raise( SIGABRT );?
> > 	
> > or the equivalent
> > 
> > 	kill( getpid(), SIGABRT);?
> 
> what happens what it's masked or caught??  Only SIGKILL and SIGSTOP can't
> be caught or ignored... (see signal(3) for more info)...

then I am an idiot who deserves the punishment.  I mean, If I want to
abort(), I am sure not going to catch or mask SIGABRT.  I thought this much
could be taken for granted.

Otherwise, you would need another signal, as Bruce already stated.

BTW, I strongly believe that the assumption that NSIG<=32 is dieing away
very fast as there are some nontrivial platforms where the converse is
true:

HP-UX 10.10:
#  define _SIGDIL       32      /* DIL signal */
#  define _SIGXCPU      33      /* CPU time limit exceeded (setrlimit)  */
#  define _SIGXFSZ      34      /* CPU file size limit exceeded (setrlimit)  */

Solaris 5.5.1:
#define SIGWAITING 32   /* process's lwps are blocked */
#define SIGLWP  33      /* special signal used by thread library */
#define SIGFREEZE 34    /* special signal used by CPR */
#define SIGTHAW 35      /* special signal used by CPR */
#define SIGCANCEL 36    /* thread cancellation signal used by libthread */
/* insert new signals here, and move _SIGRTM* appropriately */
#define _SIGRTMIN 37    /* first (highest-priority) realtime signal */
#define _SIGRTMAX 44    /* last (lowest-priority) realtime signal */

IMHO as far as UNIX is concerned, these two are pretty much the mainstream,
and, modullo SunOS brain dead 8bit FILE.fd size, had no problems porting
software to them.  sigset_t is sigset_t--who cares to what does it really
map.

/Marino

> -- 
>   John-Mark Gurney                          Modem/FAX: +1 541 683 6954
>   Cu Networking
> 
>   Live in Peace, destroy Micro$oft, support free software, run FreeBSD
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709191520.RAA10438>