This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: double free when trying to call a C++ function in GDB


Hi,

On Sat, Sep 11, 2010 at 8:24 PM, Srinath Avadhanula
<srinathava@gmail.com> wrote:
>
> I tried to call a C++ function and this crashed GDB (stack below for GDB 7.2).
>

Just to get more information, I ran gdb-7.2 through valgrind and got
the following information:

(gdb) call CG::printCfgGraph(cfg, "/tmp/foo.dot")
==27266==
==27266== Invalid free() / delete / delete[]
==27266==    at 0x4C20B2E: free (vg_replace_malloc.c:323)
==27266==    by 0x457795: do_my_cleanups (utils.c:459)
==27266==    by 0x5563F0: throw_exception (exceptions.c:232)
==27266==    by 0x5564C3: throw_it (exceptions.c:400)
==27266==    by 0x556595: throw_verror (exceptions.c:406)
==27266==    by 0x45B4D2: error (utils.c:984)
==27266==    by 0x51D5CE: find_overload_match (valops.c:2565)
==27266==    by 0x516763: evaluate_subexp_standard (eval.c:1733)
==27266==    by 0x5C1B12: evaluate_subexp_c (c-lang.c:1047)
==27266==    by 0x5125A1: evaluate_expression (eval.c:76)
==27266==    by 0x528B9F: print_command_1 (printcmd.c:969)
==27266==    by 0x45693E: execute_command (top.c:422)
==27266==  Address 0x1936e920 is 0 bytes inside a block of size 808 free'd
==27266==    at 0x4C20B2E: free (vg_replace_malloc.c:323)
==27266==    by 0x457795: do_my_cleanups (utils.c:459)
==27266==    by 0x5563F0: throw_exception (exceptions.c:232)
==27266==    by 0x5564C3: throw_it (exceptions.c:400)
==27266==    by 0x556595: throw_verror (exceptions.c:406)
==27266==    by 0x45B4D2: error (utils.c:984)
==27266==    by 0x51D5CE: find_overload_match (valops.c:2565)
==27266==    by 0x516763: evaluate_subexp_standard (eval.c:1733)
==27266==    by 0x5C1B12: evaluate_subexp_c (c-lang.c:1047)
==27266==    by 0x5125A1: evaluate_expression (eval.c:76)
==27266==    by 0x528B9F: print_command_1 (printcmd.c:969)
==27266==    by 0x45693E: execute_command (top.c:422)

Hopefully, this helps someone debug this faster.

Regards,
Srinath


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]