On Tue, Oct 28, 2008 at 06:11:49PM -0700, Bill Sommerfeld wrote:
> 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.  

Yepp - seems that clamav-milter needs a fork anyway ;-)
However I didn't know, that a "simple" malloc could result into a SEGV -
assumed, that the OS core takes care of managing memory and prevents
apps from accessing/destroying its tables ...

> You're probably writing to freed memory or writing just outside an
> allocated buffer; either can corrupt malloc's own bookkeeping.

OK - learned something new :-)

> 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.

Yepp - that's probably what I'm looking for.

Thanx a lot,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to