public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* alloca is bad?
@ 2000-11-09 18:20 Christopher Faylor
  2000-11-09 18:37 ` Michael Meissner
                   ` (2 more replies)
  0 siblings, 3 replies; 78+ messages in thread
From: Christopher Faylor @ 2000-11-09 18:20 UTC (permalink / raw)
  To: gdb

A patch that I recently submitted to gdb-patches used the alloca ()
function to allocate memory.  I've been told in private email that I
mustn't use alloca because "stack corruption problems are harder to
debug" than heap corruption problems.

I was surprised by this assertion and so I thought I'd ask for a
consensus here.  Should the use of alloca be deprecated in gdb?

It is my assertion that the amount of bookkeeping and overhead required
to use malloc in a way that is analogous with alloca essentially
nullifies the "harder to debug" argument.  malloc requires a free and
many times, in gdb context, the only way to guarantee a free is with the
use of the cleanup function.  Any time you add the complexity of
something like 'cleanup()' (or whatever other mechanism you use to
ensure that what you malloc is automatically freed) you can't claim to
have reduced debugging problems.  Speaking of free, with alloca you
don't have memory leaks.  With malloc, you do.

If alloca is bad, then why are local arrays and pointers to local
variables and parameters ok?

Inquiring minds...

cgf

^ permalink raw reply	[flat|nested] 78+ messages in thread
* Subscribe gdb-prs@sources.redhat.com to gdb@sources.redhat.com?
@ 2000-10-31 19:17 Christopher Faylor
  2000-10-31 21:28 ` Andrew Cagney
  0 siblings, 1 reply; 78+ messages in thread
From: Christopher Faylor @ 2000-10-31 19:17 UTC (permalink / raw)
  To: gdb

Does anyone have any objections to subscribing the gdb-prs mailing list
to this mailing list?  I thought that, theoretically, any problems that
show up in the gdb-prs database would be of interest here.

cgf

^ permalink raw reply	[flat|nested] 78+ messages in thread
* GDB GNATS bug tracking database available
@ 2000-10-26 20:10 Christopher Faylor
       [not found] ` <cgf@redhat.com>
  2000-10-28  4:41 ` GDB GNATS bug tracking database available Andrew Cagney
  0 siblings, 2 replies; 78+ messages in thread
From: Christopher Faylor @ 2000-10-26 20:10 UTC (permalink / raw)
  To: gdb

I've set up a GNATS database for entering GDB bugs.  The easiest way
to find it is to go to the gdb web page and follow the BUGS link.

http://sources.redhat.com/gdb/

There is also an associated gdb-prs mailing list.  You can subscribe to
it by sending email to:

gdb-prs-subscribe@sources.redhat.com

I've given "edit" privileges to every name and email address that is
currently in the MAINTAINERS file as well as everyone else that I knew
was working on gdb.

If I missed somebody, let me know.

cgf

^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2000-11-15 12:41 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-09 18:20 alloca is bad? 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
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

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).