standard error handling for malloc() broken for user root and
group wheel
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Feb 19 02:41:55 PST 2004
In message <20040219211350.H1230 at 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 at 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.
More information about the freebsd-current
mailing list