Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: David Adamec <adamec>
Subject: Re: Stack trouble with OSF/1's cc
Date: 1995/09/14	[thread overview]
Message-ID: <43a8c3$hr0@post.gsfc.nasa.gov> (raw)
In-Reply-To: 43a36g$o3c@fndaub.fnal.gov

pcanal@fndaub.fnal.gov (Philippe Canal) wrote:
>
>With the following:
>OSF1 V3.2 214 alpha
>cc  (cc)
>        The DEC OSF/1 AXP Compiler Driver 3.11
>I compile the following program:
>
>#include <stdio.h>
>int test()
>{
>     char       array[2101250]; 
>     fprintf(stderr,"I made it inside test()\n");    
>     return 0;
>} 
>
>main ()
>{
>test();
>}
>
>When I execute it I get a segmentation fault at the time of the call to 
>test(). 
>This does happen as soon as the size of my array is more than 2Mo!
>
>I was wondering if it was a bug or a feature of OSF/1, its cc or the alpha,
>and is there any patch/promise of solving it in the next version etc ...
>
>Thanks for any help!
>
>Philippe Canal 
>-- 
>Philippe
   I don't think it's a bug, you've just run out of stack space. You can
either build a new kernel allowing for a bigger stack size or you can
use malloc to put the array into data space instead of the
stack.



David Adamec




      parent reply	other threads:[~1995-09-14  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-14  4:00 Stack trouble with OSF/1's cc Philippe Canal
1995-09-14  4:00 ` Mark Charette
1995-09-14  4:00 ` David Adamec [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox