HEADS DOWN

Alfred Perlstein alfred at freebsd.org
Sun May 13 22:19:01 UTC 2007


* Ivan Voras <ivoras at fer.hr> [070512 18:06] wrote:
> Poul-Henning Kamp wrote:
> > In message <20070512153532.GQ21795 at elvis.mu.org>, Alfred Perlstein writes:
> 
> >> I like how phk malloc has it as an option.
> > 
> > But notice that it is not an option for programs that runs as root
> > or setuid/setgid etc.
> > 
> > Given the hostility of networks, I would support a more hardcore
> > attitude to memory mismanagement these days.
> 
> Just a data point: many people were turned away from FreeBSD because a
> few PHP releases did a double-free or malloc-inside-signal-handler
> calls. Yes, GNU's malloc should have been stricter, but it's not funny
> when your apache crashes with SIGABORT.

Let's clear the issue here...  FreeBSD did not have a choice in the
matter.

FreeBSD normally just emits a warning to stderr and does not crash
your program UNLESS your errant freeing screws things up so badly
that it can't help but crash...  to strike a balance between
diagnostics and speed certain things have to be trusted to the
consumer application to avoid crashes.

Normally you'd see a diagnostic along the lines of "freeing junk
pointer" or something.  However it can't fix all really stupid
bugs and sometimes will crash.

We can't be "bug for bug tolerant" with Linnex without copying
their allocator.  And since our allocator is vastly superior
we'd be hurting all the applications that are coded correctly
by doing so, along with polluting our code base with badly licensed
software.

-- 
- Alfred Perlstein


More information about the freebsd-arch mailing list