From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69220 invoked by alias); 18 Sep 2019 18:38:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69210 invoked by uid 89); 18 Sep 2019 18:38:43 -0000 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 Received: from mail-wm1-f44.google.com (HELO mail-wm1-f44.google.com) (209.85.128.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 18:38:42 +0000 Received: by mail-wm1-f44.google.com with SMTP id f16so1167907wmb.2 for ; Wed, 18 Sep 2019 11:38:41 -0700 (PDT) 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: <87ftl0jb1i.fsf@Rainer.invalid> In-Reply-To: From: Joel Rees Date: Wed, 18 Sep 2019 19:09:00 -0000 Message-ID: Subject: Re: My C arrays are too large To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00195.txt.bz2 2019=E5=B9=B49=E6=9C=8814=E6=97=A5(=E5=9C=9F) 3:50 Jose Isaias Cabrera : > > 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 > > > 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 li= ke > it. But now just blow up. Anyone thinks like me? Just my 102 Dominican > cents ($1 =3D $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