Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Cristian Zamfir <cristian.zamfir@epfl.ch>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: <gdb@sourceware.org>
Subject: Re: backtrace when corrupt stack
Date: Fri, 05 Feb 2010 19:58:00 -0000	[thread overview]
Message-ID: <251102A0-163B-4484-AEFF-D13133F6F1D8@epfl.ch> (raw)
In-Reply-To: <m2hbpvec59.fsf@igel.home>


On Feb 5, 2010, at 8:05 PM, Andreas Schwab wrote:
>> I would like to get the function name and the arguments from frame 5 (see output below) --- the one called from the function Log()). The backtrace suggests this is __stack_chk_fail () from libc but that is not correct.
> 
> Why do you think so?  That frame looks pretty reasonable.
> 
> Andreas.

I am pretty sure that the function in frame #5 should be vsprintf() which is passed a buffer with insufficiently allocated space. But on the stack I see __stack_chk_fail () instead of vsprintf (). 

My guess is that glibc detects a stack smashing and in the backtrace I see the abort handler instead of the call to vsprintf. Both vsprintf and Log have variable length arguments, but I am not sure that explains anything.  

Thanks,
Cristi  


  reply	other threads:[~2010-02-05 19:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 15:24 Cristian Zamfir
2010-02-05 17:16 ` Robert Dewar
2010-02-05 17:36 ` Tom Tromey
2010-02-05 19:05 ` Andreas Schwab
2010-02-05 19:58   ` Cristian Zamfir [this message]
2010-02-05 20:27     ` Andreas Schwab
2010-02-05 19:56 ` Dave Korn
2010-02-05 20:05   ` Cristian Zamfir
2010-02-05 20:39     ` Dave Korn

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=251102A0-163B-4484-AEFF-D13133F6F1D8@epfl.ch \
    --to=cristian.zamfir@epfl.ch \
    --cc=gdb@sourceware.org \
    --cc=schwab@linux-m68k.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