Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #58953

Re: local arrays and stack

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: local arrays and stack
Date Wed, 25 Mar 2015 12:50:28 -0700
Organization None to speak of
Lines 17
Message-ID <87pp7wq2kb.fsf@kst-u.example.com> (permalink)
References <da4ca92c-448b-4e9b-9c5d-abb5fc28b032@googlegroups.com> <ff630e23-6532-4431-9406-15c39111a78c@googlegroups.com> <d4ddda7d-9c7e-45d1-b188-d9b2fb4ffbf4@googlegroups.com> <i0nvgahdv9uuetqfqg60eee3ln1jct1720@4ax.com> <87k2y7u48c.fsf@kst-u.example.com> <705a5674-dbc9-460a-a72c-50bf1946be01@googlegroups.com> <mepdmh$qso$1@dont-email.me> <87fv8vu1sx.fsf@kst-u.example.com> <mepfa1$26r$1@dont-email.me> <1f3963cb-74d2-4b38-9241-fd6ce6c5179c@googlegroups.com> <mepjd8$kb1$1@dont-email.me> <3f401918-2171-4808-bbdb-c86d7b879d07@googlegroups.com> <mepspl$vf3$1@dont-email.me> <46c41165-11a3-4c8e-8097-6747e5177442@googlegroups.com> <meq3lh$tju$1@dont-email.me> <meran6$epa$1@dont-email.me> <merf4a$uam$1@dont-email.me> <merksa$ko5$1@dont-email.me> <meumeh$3pd$1@dont-email.me> <meuogd$dge$1@dont-email.me> <mev0uh$kf3$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="c77ff4d35e33d1c939d3461ebde8dd0d"; logging-data="27514"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xi8hlSbTL8Z4OT0jyWCyE"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:lbdJ+eKOP6fDs7iCs5dDetgLaSU= sha1:Urr5QqDVPquq8PPnmwOzrUzSZZ8=
Xref csiph.com comp.lang.c:58953

Show key headers only | View raw


Bartc <bc@freeuk.com> writes:
[...]
> (In fact, I didn't realise until this thread that VLAs were so
> unsafe. You know about the usually remote risks of stack overflow when
> some recursive algorithm goes out of control, but with VLAs you don't
> even need to call one function, just declaring an array in the middle
> of main() could be enough to bring down an application!)

Just declaring a fixed-size array in the middle of main() could do
exactly the same thing.  The only thing VLAs add is the ability to
determine the size at run time.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-22 01:51 -0700
  local arrays and stack asetofsymbols@gmail.com - 2015-03-22 02:23 -0700
  Re: local arrays and stack Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-22 13:22 -0700
    Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 01:55 -0700
  Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-22 15:07 -0700
    Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 01:50 -0700
      Re: local arrays and stack Robert Wessel <robertwessel2@yahoo.com> - 2015-03-23 04:26 -0500
        Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 06:53 -0700
        Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 07:29 -0700
          Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 08:34 -0700
          Re: local arrays and stack Robert Wessel <robertwessel2@yahoo.com> - 2015-03-23 19:57 -0500
          Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-24 04:01 -0700
            Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-24 04:37 -0700
            Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 13:04 +0100
              Re: local arrays and stack glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-03-24 17:29 +0000
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 20:01 +0100
        Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-23 08:24 -0700
          Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 08:42 -0700
            Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-23 16:07 +0000
              Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 09:15 -0700
              Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-23 09:16 -0700
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-23 16:34 +0000
                Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 10:12 -0700
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-23 17:44 +0000
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 11:47 -0700
                Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 12:06 -0700
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-23 20:25 +0000
                Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 14:10 -0700
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-23 22:22 +0000
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 23:57 -0700
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 10:28 +0100
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-24 10:44 +0000
                Re: local arrays and stack Martin Shobe <martin.shobe@yahoo.com> - 2015-03-24 06:38 -0500
                Re: local arrays and stack Martin Shobe <martin.shobe@yahoo.com> - 2015-03-24 09:57 -0500
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 13:22 +0100
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-25 16:07 +0000
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-25 17:42 +0100
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-25 19:06 +0000
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-25 12:26 -0700
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-25 13:20 -0700
                Re: local arrays and stack Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-25 12:28 -0700
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-25 21:45 +0100
                Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-25 12:50 -0700
                Re: local arrays and stack Bartc <bc@freeuk.com> - 2015-03-25 22:33 +0000
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-25 23:57 +0100
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-25 21:42 +0100
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-25 09:55 -0700
                Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-25 12:36 -0700
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-25 13:04 -0700
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-25 21:52 +0100
                Re: local arrays and stack Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-25 15:18 -0700
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-26 00:02 +0100
                Re: local arrays and stack Melzzzzz <mel@zzzzz.com> - 2015-03-26 00:47 +0100
                Re: local arrays and stack Mel <mel@zzzzz.com> - 2015-03-24 14:58 +0100
                Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-24 06:58 -0700
                Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-23 14:34 -0700
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 10:16 +0100
                Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 09:55 +0100
                Re: local arrays and stack Noob <root@127.0.0.1> - 2015-03-24 10:23 +0100
                Re: local arrays and stack Tim Rentsch <txr@alumni.caltech.edu> - 2015-03-24 12:18 -0700
                Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-24 13:42 -0700
                Re: local arrays and stack Tim Rentsch <txr@alumni.caltech.edu> - 2015-03-25 08:47 -0700
            Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 09:32 -0700
              Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-23 09:57 -0700
              Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-23 10:37 -0700
                Re: local arrays and stack Xcott Craver <xcottcraver@gmail.com> - 2015-03-23 10:49 -0700
                Re: local arrays and stack Keith Thompson <kst-u@mib.org> - 2015-03-23 12:48 -0700
                Re: local arrays and stack jt@toerring.de (Jens Thoms Toerring) - 2015-03-23 22:29 +0000
                Re: local arrays and stack James Kuyper <jameskuyper@verizon.net> - 2015-03-23 19:03 -0400
                Re: local arrays and stack jt@toerring.de (Jens Thoms Toerring) - 2015-03-23 23:36 +0000
                Re: local arrays and stack fir <profesor.fir@gmail.com> - 2015-03-24 02:17 -0700
                Re: local arrays and stack Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-23 11:56 -0700
          Re: local arrays and stack Robert Wessel <robertwessel2@yahoo.com> - 2015-03-23 20:00 -0500
            Re: local arrays and stack David Brown <david.brown@hesbynett.no> - 2015-03-24 10:39 +0100

csiph-web