public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@cygnus.com>
To: Christopher Faylor <cgf@redhat.com>
Cc: Michael Meissner <meissner@cygnus.com>,
	gdb@sources.redhat.com, Andrew Cagney <cagney@cygnus.com>
Subject: Re: alloca is bad?
Date: Sat, 11 Nov 2000 11:52:00 -0000	[thread overview]
Message-ID: <3A0DA348.6BDDAFD4@cygnus.com> (raw)
In-Reply-To: <20001109222231.A26675@redhat.com>

Someone said that heap corruption was harder to track than stack
corruption.

I couldn't disagree more.  Many (most?) of the times the function tries
to return and gets a buggy return address and frame pointer.
It then crashes and you have no idea where it happened.

The heap contents won't make it into your stack related registers,
so when something tries to use the data and crashes you still have a starting
point (it may be much latter, but at least you have somewhere to start.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

  parent reply	other threads:[~2000-11-11 11:52 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-09 18:20 Christopher Faylor
2000-11-09 18:37 ` Michael Meissner
2000-11-09 19:22   ` Christopher Faylor
2000-11-09 20:57     ` Nick Duffek
2000-11-09 22:18       ` Andrew Cagney
2000-11-09 22:20         ` Christopher G. Faylor
2000-11-10  6:21           ` Jim Blandy
2000-11-10  8:27             ` Christopher Faylor
2000-11-10 22:13             ` Andrew Cagney
2000-11-10 23:34               ` Eli Zaretskii
2000-11-11  9:08               ` Nick Duffek
2000-11-11 11:37                 ` Fernando Nasser
2000-11-11 13:16                   ` Nick Duffek
2000-11-12 16:42               ` Michael Meissner
2000-11-12 22:49               ` [RFA] alloca coding standard Nick Duffek
2000-11-13  3:16                 ` Eli Zaretskii
2000-11-13  4:51                 ` Andrew Cagney
2000-11-13  8:45                   ` [RFA] Move alloca(0) to wait_for_inferior() from registers_changed() Nick Duffek
2000-11-13  9:32                     ` Nick Duffek
2000-11-13  7:13                 ` [RFA] alloca coding standard Fernando Nasser
2000-11-13 12:31                 ` Nick Duffek
     [not found]                   ` <nsd@redhat.com>
2000-11-13 12:58                     ` Kevin Buettner
2000-11-13 13:19                       ` Nick Duffek
2000-11-14  7:42                         ` Jim Blandy
2000-11-14  7:54                           ` Michael Meissner
2000-11-14 10:27                             ` Jim Blandy
2000-11-14 17:15                               ` Andrew Cagney
2000-11-15  3:21                         ` Eli Zaretskii
2000-11-15 12:41                           ` Christopher Faylor
2000-11-15  3:20                   ` Eli Zaretskii
2000-11-10  2:40     ` alloca is bad? Eli Zaretskii
2000-11-11 11:52     ` Fernando Nasser [this message]
2000-11-11 16:13       ` Christopher Faylor
2000-11-12  0:20         ` Fernando Nasser
2000-11-11 21:39       ` Eli Zaretskii
2000-11-12  0:07         ` Fernando Nasser
2000-11-12  4:17           ` Eli Zaretskii
2000-11-12 10:39             ` Chris Faylor
2000-11-12 15:16               ` Andrew Cagney
2000-11-12 15:16             ` Fernando Nasser
2000-11-13  3:13               ` Eli Zaretskii
2000-11-13  8:05                 ` Michael Meissner
2000-11-12 16:49             ` Michael Meissner
2000-11-12  1:55         ` Andrew Cagney
2000-11-12 17:00           ` Michael Meissner
2000-11-13  3:14             ` Eli Zaretskii
2000-11-13  8:10               ` Michael Meissner
2000-11-13 12:14             ` Nick Duffek
2000-11-13 12:21               ` Michael Meissner
2000-11-13 13:24                 ` Nick Duffek
2000-11-14  6:37                   ` Michael Meissner
2000-11-14  7:39               ` Jim Blandy
2000-11-09 22:27 ` Andrew Cagney
2000-11-10  2:39 ` Eli Zaretskii
2000-11-10  8:16   ` Chris Faylor
2000-11-10  8:42     ` Fernando Nasser
2000-11-10  8:46       ` Christopher Faylor
2000-11-10  9:08         ` Fernando Nasser
2000-11-10 22:17           ` Andrew Cagney
2000-11-10  9:05       ` Michael Meissner
2000-11-10 12:00     ` Eli Zaretskii
2000-11-10 21:34     ` Andrew Cagney
2000-11-11 10:07       ` Christopher G. Faylor
2000-11-13  7:52         ` Jim Blandy
2000-11-13  8:25           ` Christopher G. Faylor
  -- strict thread matches above, loose matches on Subject: below --
2000-10-31 19:17 Subscribe gdb-prs@sources.redhat.com to gdb@sources.redhat.com? Christopher Faylor
2000-10-31 21:28 ` Andrew Cagney
2000-10-31 21:34   ` Christopher Faylor
2000-11-01  9:15     ` Tom Tromey
2000-11-01 10:54       ` Christopher Faylor
2000-10-26 20:10 GDB GNATS bug tracking database available Christopher Faylor
     [not found] ` <cgf@redhat.com>
2000-10-26 21:18   ` Kevin Buettner
2000-10-27  7:39     ` Fernando Nasser
2000-10-27  9:35     ` Christopher Faylor
2000-10-31 22:07   ` Subscribe gdb-prs@sources.redhat.com to gdb@sources.redhat.com? Kevin Buettner
2000-11-12 11:30   ` alloca is bad? Kevin Buettner
2000-11-12 15:32     ` Andrew Cagney
2000-10-28  4:41 ` GDB GNATS bug tracking database available Andrew Cagney

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=3A0DA348.6BDDAFD4@cygnus.com \
    --to=fnasser@cygnus.com \
    --cc=cagney@cygnus.com \
    --cc=cgf@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=meissner@cygnus.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).