help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with older g++ or code


From: Paul Pluzhnikov
Subject: Re: Problem with older g++ or code
Date: Mon, 23 Apr 2007 20:13:35 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Brian C <brianc@no.sp.a.m.dynamissoftware.com> writes:

>       I've got a program that works on my local machine:

It may appear to work, but is it bug-free?

Rebuild it with -D_GLIBCXX_DEBUG, and see how many bugs that finds.
Also test it with Valgrind (www.valgrind.org).

>       The program loops (well, by loop, I mean it chews up the CPU)
>       on the web server's machine at the following point:
>
> Program received signal SIGINT, Interrupt.
> 0xb7d46574 in malloc_consolidate () from /lib/tls/libc.so.6
> (gdb) where
> #0  0xb7d46574 in malloc_consolidate () from /lib/tls/libc.so.6
> #1  0xb7d46438 in _int_free () from /lib/tls/libc.so.6
> #2  0xb7d45278 in free () from /lib/tls/libc.so.6

The big question is: does it ever return from that level.
Execute 'gdb' finish command to find out.

If it doesn't return, it's a safe bet that you've corrupted heap.
In that case, Valgrind is your friend.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]