Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 1997 08:37:22 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        "marino.ladavac@siemens.at" <lada@ws6303.gud.siemens.at>
Cc:        freebsd-bugs@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Bug in malloc/free
Message-ID:  <19970919083722.51186@hydrogen.nike.efn.org>
In-Reply-To: <199709191520.RAA10438@ws6423.gud.siemens.at>; from marino.ladavac@siemens.at on Fri, Sep 19, 1997 at 05:20:50PM %2B0200
References:  <199709191520.RAA10438@ws6423.gud.siemens.at>

next in thread | previous in thread | raw e-mail | index | archive | help
marino.ladavac@siemens.at scribbled this message on Sep 19:
> > 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.

sorry.... if you were called from another program (as malloc is), the
SIGABRT will be in an unknown state...  and requires fiddling with the
signals first... as you state...  it just wasn't clear that you knew
this was needed...

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

I agree... a friend of mine is VERY annoyed that you can't reliably get
a core dump with a very simple operation...

> 
> 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:

this is good to hear...

[...]

> 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.

-- 
  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?19970919083722.51186>