My C arrays are too large
Eliot Moss
moss@cs.umass.edu
Fri Sep 13 18:50:00 GMT 2019
On 9/13/2019 2:39 PM, Achim Gratz 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
Works for me (but how obscure!). Eliot
--
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
More information about the Cygwin
mailing list