Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: jf <jf@danglingpointers.net>
To: gdb@sourceware.org
Subject: signals in a multithreaded application
Date: Fri, 05 Jan 2007 00:53:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0701050825510.23528@localhost.localdomain> (raw)

Hi,

I've got a weird issue that I am not sure if it is occurring because of GDB
or if it's an issue in glibc or otherwise. Basically, I'm in the process
of working on a bug that causes heap corruption via a double free(), which
(typically) causes a message along the lines of:

*** glibc detected *** double free or corruption (<type>):  <address> ***

Followed by a call to abort() which raises SIGABRT. However I am finding
while debugging that sometimes the signal is never raised and I end up
with something more along the lines of:

*** glibc detected *** [Switching to Thread ...]

And the program continues running fine (minus of course the heap
corruption). Has anyone encountered this before? I changed the settings in
GDB telling it to not pass the exception to the application thinking that
the terminal was just messing up or similar and it just happened at the
same time GDB decided to switch threads (is that GDB changing threads or
the OS??), but I found that the signal is never delivered.

The thread appears to be in the __libc_message() function, and my thinking
is that perhaps its getting interrupted and then for whatever reason the
thread is never handed control again?

At any rate, I was curious if this is a known issue or someone else has
encountered it and save me the time of having to dig into the source code
for a bunch of unrelated programs.

Thanks.

-- 

	Success is not final, failure is not fatal:
	it is the courage to continue that counts.

	-- Sir Winston Churchill


             reply	other threads:[~2007-01-05  0:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05  0:53 jf [this message]
2007-01-05  0:58 ` Daniel Jacobowitz

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=Pine.LNX.4.64.0701050825510.23528@localhost.localdomain \
    --to=jf@danglingpointers.net \
    --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