From owner-freebsd-bugs Fri Sep 19 08:37:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA19117 for bugs-outgoing; Fri, 19 Sep 1997 08:37:55 -0700 (PDT) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA19112; Fri, 19 Sep 1997 08:37:51 -0700 (PDT) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id IAA06554; Fri, 19 Sep 1997 08:37:23 -0700 (PDT) Message-ID: <19970919083722.51186@hydrogen.nike.efn.org> Date: Fri, 19 Sep 1997 08:37:22 -0700 From: John-Mark Gurney To: "marino.ladavac@siemens.at" Cc: freebsd-bugs@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Bug in malloc/free References: <199709191520.RAA10438@ws6423.gud.siemens.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199709191520.RAA10438@ws6423.gud.siemens.at>; from marino.ladavac@siemens.at on Fri, Sep 19, 1997 at 05:20:50PM +0200 Reply-To: John-Mark Gurney Organization: Cu Networking 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/ Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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