hi,

wondering, why malloc SEGVs on x86 (U40) using Studio 12 with latest patches
on snv_98:

elkner.q ~/tmp/clamav-0.94/clamav-milter > dbx .libs/clamav-milter core
core file header read successfully
Reading ld.so.1
Reading libclamav.so.5.0.1
Reading libclamunrar_iface.so.5.0.1
Reading libclamunrar.so.5.0.1
Reading libbz2.so.1
Reading libz.so.1
Reading libnsl.so.1
Reading libmilter.so.1
Reading libsocket.so.1
Reading libsendfile.so.1
Reading libresolv.so.2
Reading libpthread.so.1
Reading libc.so.1
[EMAIL PROTECTED] ([EMAIL PROTECTED]) program terminated by signal SEGV (no 
mapping at the fault address)
0xfeb34548: realfree+0x0048:    movl     (%eax,%esi),%ecx
Current function is main
 1030                   cfgfile = malloc(strlen(CONFDIR) + 12);  /* leak */
(dbx) where
current thread: [EMAIL PROTECTED]
  [1] realfree(0x807d3b8), at 0xfeb34548
  [2] cleanfree(0x0), at 0xfeb34bc3
  [3] _malloc_unlocked(0x10, 0x8046d1c, 0x8046ba0, 0x0, 0x8046bb8,
0x805a5fa), at 0xfeb34015
  [4] malloc(0x10, 0x0), at 0xfeb33f4f
=>[5] main(argc = 2, argv = 0x8046be4), line 1030 in "clamav-milter.c"
(dbx)

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

Link cmd is:
cc -m32 -g -o .libs/clamav-milter cfgparser.o output.o getopt.o misc.o 
network.o clamav-milter.o ../libclamav/.libs/libclamav.so 
/home/elkner/tmp/clamav-0.94/libclamunrar_iface/.libs/libclamunrar_iface.so 
/home/elkner/tmp/clamav-0.94/libclamunrar/.libs/libclamunrar.so -lc -L/usr/lib 
-lbz2 -lz -lnsl -lmilter -lsocket -lsendfile -lresolv -lpthread

Any hints?

Regards,
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