[SunHELP] Core dumped in _malloc_unlocked and realloc onSolaris 8

Libor Chocholaty sunhelp at sunhelp.org
Thu Dec 6 05:10:40 CST 2001


Greg wrote:

> On 12/03/01 02:10 AM, Libor Chocholaty wrote:
>
> > I working on application which uses CORBA. One particular server-side
> > multithreaded program core dumps in call malloc. I use GCC-2.95.2 from
> > www.sunfreeware.com. I think that this bug is solved for Sun C 5.0
> > compiler, but not for GCC. Do anybody know what I do wrong?
>
> That's the generic symptom of heap corruption.  Use something like
> Purify or the Sun Workshop debugger's "run-time checking" (rtc command)
> to chase down where the program is corrupting its heap, freeing already
> freed memory, etc.
>

Heap corruption? How can I do it? My problem is not with freeing of memory,
but with allocation. Still I found two circumstances when my program core
dumps.

1. call malloc
2. call pthread_mutex_attr_init

When I look into core file I look the same situation always. It seems in
this manner:
(gdb) bt
#0  0xff1c116c in realloc () from /usr/lib/libc.so.1
#1  0xff1c0f3c in _malloc_unlocked () from /usr/lib/libc.so.1
#2  0x17b628 in malloc_re (sz=15360) at source/memory_re.c:31
#3  0x13c8fc in dir_class::get_buf (this=0x57a0e8, status=0xffbeeac8) at
source/dir.cxx:831
...

in function memory_re is on line 31 call of malloc. Could you imagine this
behaviour?

Libor Chocholaty



More information about the SunHELP mailing list