On Mon, 2008-10-27 at 03:44 +0100, Jens Elkner wrote:
> If I link with -lmalloc the SEGV doesn't occure. If I LD_PRELOAD=
> libumem.so.1 without using -lmalloc, the SEGV does not occure in main
> but in the first lib, which uses malloc - strange ...
basic rule of C coding:
when you get a SEGV or equivalent in malloc or free, suspect your own
code first.
You're probably writing to freed memory or writing just outside an
allocated buffer; either can corrupt malloc's own bookkeeping.
Look at the umem_debug(3MALLOC) man page for some hints on environment
variables you can set to change libumem's behavior in ways that make it
more likely that you'll find your own bug.
- Bill
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code