From owner-freebsd-current@FreeBSD.ORG Thu Feb 19 02:41:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69E1616A4CE for ; Thu, 19 Feb 2004 02:41:55 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3CE943D2D for ; Thu, 19 Feb 2004 02:41:54 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id i1JAfiwn025905; Thu, 19 Feb 2004 11:41:49 +0100 (CET) (envelope-from phk@phk.freebsd.dk) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 19 Feb 2004 21:35:58 +1100." <20040219211350.H1230@gamplex.bde.org> Date: Thu, 19 Feb 2004 11:41:44 +0100 Message-ID: <25904.1077187304@critter.freebsd.dk> cc: current@freebsd.org cc: kientzle@acm.org Subject: Re: standard error handling for malloc() broken for user root and group wheel X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Feb 2004 10:41:55 -0000 In message <20040219211350.H1230@gamplex.bde.org>, Bruce Evans writes: >On Thu, 19 Feb 2004, Poul-Henning Kamp wrote: > >[The problem turned out to be mainly controlling both undefined behaviour >and standard behaviour with the same flag.] > >> Think if the 'A' option as userland SIGSEGV. (peter@ actually suggested >> that I make it kill(getpid(), SIGSEGV) before calling abort in order >> to let a process install a handler for it. > >Programs can already catch SIGABRT, and they probably need to be familiar >with malloc's internals to trap its errors sort of safely, so it is >reasonable to expect them to know what to trap. There is already a hook for catching the message. And I still think you guys overlook the fact that phkmalloc is being a heck of a lot more informative than any other production malloc(3) implementation which generally just croak or corrupt. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.