Subject: Re: The _weirdest_ segfault...
To: None <port-alpha@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: port-alpha
Date: 05/17/2000 14:41:07
In message <Pine.GSO.4.21.0005172057580.6238-100000@sigma1.sm.luth.se>, Andreas
Falck writes:
>**** Segfault in malloc!?! ****
Check the comp.lang.c FAQ. :)
My personal experience: In the last ~10 years, I have seen roughly zero
bugs in malloc that cause segfaults, and several hundred cases where a
program stomps on malloc arena data and *causes* malloc to die.
>Anyone knows or have an idea how it is possible? I could guess it might
>have something to do with wrong alignment, but shouldn't the kernel fix
>such things? (my sysctl settings are such, according to the faq).
It's almost certainly a result of something trashing malloc's data structures
by exceeding bounds or otherwise breaking the rules.
-s