delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/09/18/14:39:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
q=dns; s=default; b=mpJ0uZxGRbkirtlAAILBL14pWuHbIZLyynJf8ICKs4i
8ON2Hh3PQqCoodKNBPODvfUha91/2Ywm5KYGmUGItA5vbT9HGeQTswN/q6leqI+Y
4OLkbOiB1UCYF0oHS8QJQF4zydajwsDxhn+Drr0lv77N2Sv5IUp2iPnvhecec908
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-type:content-transfer-encoding;
s=default; bh=n3Qv9jllrvbfxUa6iO+Nw+9AAhU=; b=wyKvUSsbht4hMcfgb
JSHueDbVMhkHElW601E49Xb6puPslwfbWw7huka6VMzMp0WuF3fFIXHJ5Jiy/sAW
I963fE2ayIffBRLR0aoFJc9eZHEMJvvvWuMQHgKZ2LgPo93+8yqKtHbtmo9/kwco
F11QNoqUTBSQ80E7ummpMM33Ps=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=ASBESTOS_BODY,AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=up, 20199, suit, III
X-HELO: mail-wm1-f44.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=nh4nIJuczUl4/gGoEeO36gnYKNzqT9jqancJWtubn7E=; b=LK/voD9bjIKw+vsgmT/Vs5Joq0cZE+xjNOC4oo0wyLz+Kdd5xrZnM4srNm+/yLAd5y wnnCIiayxvy9a5DRy6KIhzcoOsvE8i1GzcgA+bUtCP9rUrzr1AOXHSdkiOXxpD4e8tk4 CKVvmUhgaALpRdRqvyyEEI168vbDOgbcVl5O49pXD/mPWgv6I7lTqBxryYL+NrGish4V bwBrFdBzxUsUDJ11ga6XPRpE/z2Eol8vApqI2ZRktq8Pb1eNkIX7BZbDAtlL/bbVtzfo 4lPRJW81uMaLcEnvb7tE6MBOpyWlMM4rbmBD1cVdt/SNtoJAgAJartk0oJsCXIHGSYks DABw==
MIME-Version: 1.0
References: <CY4PR1101MB21339312E8F5656D8C887BFE81B30 AT CY4PR1101MB2133 DOT namprd11 DOT prod DOT outlook DOT com> <87ftl0jb1i DOT fsf AT Rainer DOT invalid> <VI1PR01MB44132EB2432CCD4CE1892304DEB30 AT VI1PR01MB4413 DOT eurprd01 DOT prod DOT exchangelabs DOT com>
In-Reply-To: <VI1PR01MB44132EB2432CCD4CE1892304DEB30@VI1PR01MB4413.eurprd01.prod.exchangelabs.com>
From: Joel Rees <joel DOT rees AT gmail DOT com>
Date: Thu, 19 Sep 2019 03:38:27 +0900
Message-ID: <CAAr43iMBDJdYeybs0Lc3JZQyCDWGQuzU-MT-hVDDL0kg3LxFVg@mail.gmail.com>
Subject: Re: My C arrays are too large
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x8IIdIEV030991

2019年9月14日(土) 3:50 Jose Isaias Cabrera <jicman AT outlook DOT com>:

>
> Achim Gratz, on Friday, September 13, 2019 02:39 PM, wrote...
> >
> > Blair, Charles E III writes:
> > > My apologies for failing to reply on-list.  I don't know how :(
> > >
> > > My machine is 64 bit, and I hope I installed the correct version of
> cygwin.
> > >
> > > This program:
> > >
> > > #include<stdio.h>
> > > int main(){char *a[50][8192];
> > > return 0;}
> > >
> > > compiles with gcc  (no special options) but gives "Segmentation fault".
> >
> > You are creating an automatic variable that's larger than the default
> > stack.  You need to enlarge the stack, either during link time or later
> > e.g. via
> >
> > peflags -x0x800000 a.out
>
> This is great! Thanks.
>
> But, let's talk about this a bit... Shouldn't the compiler provide some
> warning, and also, it should never blow up with a "Segmentation fault".  I
> believe there should be some type of Out Of Memory error, or something like
> it.  But now just blow up.  Anyone thinks like me?  Just my 102 Dominican
> cents ($1 = $51 Dominican). :-)
>

Well, the behavior of the compiler itself is better discussed on the
compiler's forums, although you may need your asbestos suit when you do so.

That said, why do you want this variable to be automatic? Why do you want
it allocated on the stack?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019