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


Groups > comp.unix.shell > #24886

Re: Command Languages Versus Programming Languages

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups comp.unix.shell, comp.unix.programmer, comp.lang.misc
Subject Re: Command Languages Versus Programming Languages
Date 1 Apr 2024 21:13:42 GMT
Organization Stefan Ram
Lines 25
Expires 1 Feb 2025 11:59:58 GMT
Message-ID <stack-20240401220727@ram.dialup.fu-berlin.de> (permalink)
References <uu54la$3su5b$6@dont-email.me> <87edbtz43p.fsf@tudado.org> <types-20240401151149@ram.dialup.fu-berlin.de> <20240401111552.00006ddc@gmail.com> <20240401134457.000067f2@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace news.uni-berlin.de blSA4b7xpdY41MLQXyMIEQm4lZ1qAuiM2R2eN5wnajYOEC
Cancel-Lock sha1:MREBjHXWXc0mxTaqpn6KMY08iZo= sha256:3/hsTDcoUKskm97Ms0YSZrUWrylDMRMjQOhKNvacFGs=
X-Copyright (C) Copyright 2024 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed.
X-No-Archive Yes
Archive no
X-No-Archive-Readme "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access.
X-No-Html yes
Content-Language en-US
Xref csiph.com comp.unix.shell:24886 comp.unix.programmer:15633 comp.lang.misc:10306

Cross-posted to 3 groups.

Show key headers only | View raw


John Ames <commodorejohn@gmail.com> wrote or quoted:
>And, in fact, C actually does one specific bit of automatic memory
>management itself - the stack, which may or may not even *be* a true
>hardware stack (depending on the architecture,) and which is handled in
>an entirely transparent fashion* by compiler-generated entry/exit code
>generated by the compiler for each function.

  This stack "management" is "limited" in C:

|Unfortunately, the notion of stack overflow is not mentioned
|by the standard or the standard’s rationale at all. This is
|very troublesome, as for most actual implementations stack
|overflow is a real problem.
...
|in a real C implementation, a call like f(10000000) will not
|return 10000000, but instead will crash with a message like
|"segmentation fault". Furthermore, stack overflow does not
|necessarily have to result in a crash with a nice error
|message, but might also overwrite non-stack parts of the
|memory (possibly putting the address of virus code there).
|Stack overflow even can occur without function calls. For
|example, the program int main(void) { int a[10000000]; }
...
"Subtleties of the ANSI/ISO C standard" (2012); Robbert
Krebbers, Freek Wiedijk; Radboud University Nijmegen.

Back to comp.unix.shell | Previous | Next | Find similar


csiph-web