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


Groups > comp.std.c > #1658

Re: VLAs use less stack

From Hans-Bernhard Bröker <HBBroeker@t-online.de>
Newsgroups comp.std.c
Subject Re: VLAs use less stack
Date 2012-09-04 00:03 +0200
Message-ID <aaknq3F87aU1@mid.dfncis.de> (permalink)
References <k1q5bu$49h$1@speranza.aioe.org> <lnsjb2ucn5.fsf@nuthaus.mib.org> <k2034n$jb5$1@reader1.panix.com> <lnzk58f6ng.fsf@nuthaus.mib.org> <k20nhd$b0$1@dont-email.me>

Show all headers | View raw


On 03.09.2012 00:45, John Nagle wrote:

>     If the program isn't recursive, and you do code coverage tests,
> so that the worst case stack depth has been exercised,

It's relatively easy to prove that this is impossible to achieve in the 
general case.  Even without VLAs you run into problems as soon as you 
have function pointer variables involved, because trying to predict 
which functions those can possibly point to, short of actually running 
the program with all possible inputs, is generally equivalent to the 
Halting Problem.  VLAs make that even more impossible, because even if 
you can build a known-complete call tree that still doesn't give you the 
actual stack size.

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


Thread

VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-08-31 12:58 +0200
  Re: VLAs use less stack Marc <marc.glisse@gmail.com> - 2012-08-31 14:10 +0000
    Re: VLAs use less stack Marc <marc.glisse@gmail.com> - 2012-08-31 14:13 +0000
    Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-08-31 18:09 +0200
    Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-08-31 18:14 +0200
    Re: VLAs use less stack John Nagle <nagle@animats.com> - 2012-09-01 12:24 -0700
      Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-01 22:57 +0200
      Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-01 22:59 +0200
  Re: VLAs use less stack Keith Thompson <kst-u@mib.org> - 2012-08-31 11:42 -0700
    Re: VLAs use less stack Marc <marc.glisse@gmail.com> - 2012-09-01 10:18 +0000
      Re: VLAs use less stack Rui Maciel <rui.maciel@gmail.com> - 2012-09-01 19:18 +0100
        Re: VLAs use less stack Marc <marc.glisse@gmail.com> - 2012-09-01 19:19 +0000
        Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-01 23:01 +0200
      Re: VLAs use less stack Keith Thompson <kst-u@mib.org> - 2012-09-01 11:36 -0700
        Re: VLAs use less stack Marc <marc.glisse@gmail.com> - 2012-09-01 19:05 +0000
    Re: VLAs use less stack jgk@panix.com (Joe keane) - 2012-09-02 16:56 +0000
      Re: VLAs use less stack Keith Thompson <kst-u@mib.org> - 2012-09-02 14:22 -0700
        Re: VLAs use less stack jgk@panix.com (Joe keane) - 2012-09-04 00:39 +0000
          Re: VLAs use less stack Jens Gustedt <jens.gustedt@loria.fr> - 2012-09-04 10:28 +0200
            Re: VLAs use less stack John Nagle <nagle@animats.com> - 2012-09-04 11:31 -0700
          Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-04 17:02 +0200
      Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-02 23:28 +0200
      Re: VLAs use less stack Keith Thompson <kst-u@mib.org> - 2012-09-02 14:37 -0700
        Re: VLAs use less stack John Nagle <nagle@animats.com> - 2012-09-02 15:45 -0700
          Re: VLAs use less stack Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-09-04 00:03 +0200
  Re: VLAs use less stack jgk@panix.com (Joe keane) - 2012-09-01 16:09 +0000
    Re: VLAs use less stack Keith Thompson <kst-u@mib.org> - 2012-09-01 11:45 -0700
    Re: VLAs use less stack jacob navia <jacob@spamsink.net> - 2012-09-01 23:05 +0200

csiph-web