This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: simple C program crashes at run time


On Aug 12 12:47, user@lngs.infn.it wrote:
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> 
> #define  TAGLIA  415
> main()
> {
> 
>    int i, j, k, iran;
>    unsigned int seed;
>    float  unran;
>    float  mata[TAGLIA][TAGLIA],
>           matb[TAGLIA][TAGLIA],
>           matc[TAGLIA][TAGLIA];

Your local data is too big for the default stack size of 2 Megs when
you're setting TAGLIA to a value >= 416.  Try e. g. 

  gcc -Wl,--stack=3000000 unlucky.c -o unlucky


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]