On Wed, Dec 02, 2015 at 08:37:05AM -0500, Ted Unangst wrote:
> This is a variant of the diffs sent by Daniel Micay, and then assembled by
> Theo Buehler. I've looked it over and made a few tweaks.
> 
> One: validate the junk in malloc hasn't been touched. I've tweaked this to
> always be on if junk is on, but to only check the first 32 bytes. (Without the
> atexit() handler, since I do not trust installing such by default.) I think
> this is a decent compromise between checking and performance and complexity
> and whatnot.
> 
> Two: add chunk canaries at the end of allocations. I would like to do
> something more interesting here (and by default, of course) but growing the
> size of every allocation isn't free. Many userland applications already aim
> for power of two sizing, so expanding by 4/8 bytes is far from free. However,
> this is an ineresting feature, it's not that intrusive, and maybe we can build
> from it. Include it as well.
> 
> Hurray or nay?

FWIW, I would be very happy to see this go in.  Your changes make sense
to me, although I can't really judge the price of your point two on
slower architectures.  I believe it's slightly slower than Daniel's
version although I don't have hard data to back this.

I've been running with Daniel's patches and /etc/malloc.conf -> CJV
on my two production laptops without any issues for more than a month
now.

Running with your diff and 'CJ' since Wednesday.

Reply via email to