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:from:to:subject:date:message-id:references :in-reply-to:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=y24fDORyswIeFT0E WO8MSFjVTZiO0VOtizQpr3PCQjnUJIUkAXEX+FtYW7AyafTLQ/sZi6TMB/v69L+U /Xnhch0CkNyBpBtveBsrPudz5t+vLWmeFGkadLpzsUi7aA8PtuoSVdLJnIbgLSZX DLz8McUvUr4vedIW1scwGO42Qls= 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:from:to:subject:date:message-id:references :in-reply-to:mime-version:content-type :content-transfer-encoding; s=default; bh=eF3gHwSxugJkGO9ZJJYcUG 1xiwE=; b=tZ1FCdrnLXb5LTgXbOD/aHYvlhGWPtOE/jpiqVH/c18r2FryTg40RR 96fZlFVJNhZAQUunPS1PM090moZeT5cvJEgX48KBX/m8II+2CH/CAxa3M0Kj2WXj unGV86i5i76eMs5A/ZsuYQA1Q7PCfglePBWvVHm+0//tF/jrJz0vg= 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.0 required=5.0 tests=ASBESTOS_BODY,AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=III, suit, charles, bg X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VNRzvg14HSaCJXkSTrfliyYFPeQ/p84W69yZeqMYZ4Zair/467SBm6rDTvaQwqKUVnbB5PlPrdr4gvoMLt6rDRR9fKYHC6VazGsf3V7NMqt8jFCvF8eAIqk5l/RIcfXw6wRU+2x0GLPpAI/RXFzAfgZYLSPm7pE7JU5HVhteDKX1EVhZV+mlarXkx2KEeFSdooD1NJSF4PnbQX0IC0X/7chabo4iJS5E1Q8RWjiIkSXOhLQAISV6LtYEVVtET90WBNskjNRj9ZcuXCwo/QMt5ucn2n/+gCGObQNuJM6t6PLpPynP/8JBOstdBMt4BQsUy2imcuiTfOA77crUt0u2ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xu14iQ4BhJu/yKLcGFp0qiHN+2FM6o5/tpl5GWYe7gY=; b=RDj9cnyOYq++0g3pJwzvaupZ9vis/onxVQ/L4gEkXZYocJFVNBnuEfqaSMmcqMw6/IpEv1P1TLLMCA9mpqBaQDklrVuuMlUVPXdEsOnCKwplEK3i+yBwqoG8LM6y4NCmlvSDXKT9/773HyRuZZ0oiypxyjzJ7SaJHbZU2+IDKHT+2WLyhilFosJRhQenQ7exnHfs4BnPywhCWGGh1q+HG7cBkD+tYAi8Ouz+c180zYF20VAaY0c199Pu+M9ccdHdj6vxrENAMEvlvD3huB2LjCrxSRsNQwRhHtxssADsmXn4XG4LpE0dZSAqM/HLkOAABbKsdQjzHIlv4ZlM/W1yBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xu14iQ4BhJu/yKLcGFp0qiHN+2FM6o5/tpl5GWYe7gY=; b=iY3LrXfsUp/HV4tK/CWXKDx5MXujWfGP1B7mjL4ezdXSEEb/GyoW6cOrR80byrtcRURBei0LVdzTXehYlHxl/SXGOBZONctXfjm3+It5+q4AkUpt1R0WOjTLEhN1B2tRV4eRQjxXonDr84AGh0WbkMExFnkCvRAbRm3pWePFYcpNql6B2z0PYRuBZDZPLX+jNTJVCqh5pI1y337AJFLrB8TioVM364S8jDekgbOb6dlzPQSH/zZEZ2czzCyjIc+P0biEtemVMXoUR652dMUk8mOemLSqHF9rVr/G8+MArpifCkrb/Jav6uZ5A6IEsMwpk7m3fMqZUV6452JQygQURg== From: Jose Isaias Cabrera To: Joel Rees , "cygwin AT cygwin DOT com" Subject: Re: My C arrays are too large Date: Wed, 18 Sep 2019 20:35:39 +0000 Message-ID: References: <87ftl0jb1i DOT fsf AT Rainer DOT invalid> , In-Reply-To: x-ms-exchange-transport-forked: True MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x8IKaGiY012262 Joel Rees, on Wednesday, September 18, 2019 02:38 PM, wrote... > > 2019年9月14日(土) 3:50 Jose Isaias Cabrera, on > > > > > 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? I did not say automatically. I said that the compiler should provide some warning about the allocation being larger than the default stack. And, it should not result in a segmentation fault, but instead, the program should error out with out of memory, or, at least, "memory allocation is larger than default stack." Not just blow up. -- 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