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: List-Subscribe: List-Archive: List-Post: List-Help: , 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: <87ftl0jb1i DOT fsf AT Rainer DOT invalid> In-Reply-To: From: Joel Rees Date: Thu, 19 Sep 2019 03:38:27 +0900 Message-ID: Subject: Re: My C arrays are too large To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x8IIdIEV030991 2019年9月14日(土) 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 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