tags:

views:

62

answers:

1

I have an ncurses app that does the following, sometimes instantly after launch, sometimes after some fiddling.

malloc: *** error for object 0x100300400: double free
Program received signal SIGABRT, Aborted
(gdb) where
#0 0x00007fff846a7426 in read ()
#1 0x00007fff83f3d775 in _nc_wgetch ()
#2 0x00007fff83f3de3f in wgetch ()
(and so on into my code)

Does anyone have suggestions for likely things to pursue?

+2  A: 

It looks like you are using glibc, likely on an x86_64 Linux system.

The tool to use for any kind of heap corruption on Linux/x86_64 is Valgrind. It will just immediately give you the answer, so there is no point in guessing where the problem might be (and it could be anywhere).

Employed Russian
glibc, Darwin, 10.6 so valgrind is out of the question. Then again, I also have Ubuntu, putting valgrind back on the table. Thanks.
Paul Beckingham