From: Srinath Avadhanula <srinathava@gmail.com>
To: gdb@sourceware.org
Subject: Re: double free when trying to call a C++ function in GDB
Date: Sun, 12 Sep 2010 15:32:00 -0000 [thread overview]
Message-ID: <AANLkTi=7B4WPr0Kz6j9Lmurd8Z9nwJp6nRJ+0nOUNUA-@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=8wvKMyDFLmmj0ih+vCg8tUb6vCAfxdyjyLStj@mail.gmail.com>
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
next prev parent reply other threads:[~2010-09-12 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 0:24 Srinath Avadhanula
2010-09-12 15:32 ` Srinath Avadhanula [this message]
2010-09-13 17:59 ` sami wagiaalla
2010-09-14 0:59 ` Srinath Avadhanula
2010-09-16 17:01 ` sami wagiaalla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=7B4WPr0Kz6j9Lmurd8Z9nwJp6nRJ+0nOUNUA-@mail.gmail.com' \
--to=srinathava@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox