Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 From: "Dave Korn" To: Subject: RE: g77 executable with largish array fails (solved?) Date: Tue, 26 Oct 2004 14:14:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <417DFEB1.1080604@familiehaase.de> Message-ID: X-OriginalArrivalTime: 26 Oct 2004 13:14:43.0734 (UTC) FILETIME=[C22DA360:01C4BB5D] > -----Original Message----- > From: cygwin-owner On Behalf Of Gerrit P. Haase > Sent: 26 October 2004 08:37 > Billinghurst, David (CALCRTS) wrote: > > >>From: David Billinghurst > >> > >>The following test case is distilled from the LAPACK timing > test cases. > >>These used to work on some previous versions of cygwin/g77, > but now fail. > > > > > > I translated the problem into C using f2c. It becomes: > > > > $ cat labugc.c > > int main() { > > static float a[39*1024*1024]; > > } > > > > $ gcc -O0 -o labugc.exe labugc.c > > $ ./labugc > > C:\cygwin\usr\people\billingd\labugc.exe (3372): *** > MapViewOfFileEx(0x728, in_h 0x728) failed, Win32 error 6 > > > > > > Aha, I says. Looks like stack overflow. Google pointed me > to an work around > > gcc -Wl,--stack,200000000 -O0 -o labugc.exe labugc.c > > > > David > > Interesting, it works without special flags when using gcc-3.4.1. > > Gerrit I can explain that: here's why a static variable might cause a MapViewOfFileEx, and also why changing the stack size might fix it: http://www.cygwin.com/ml/cygwin/2004-07/msg00646.html and so I reckon the difference between 3.3.3 and 3.4.1 in this regard will be cause by the change in placement of statically zero initialised data. Gerrit, does adding -fzero-initialized-in-bss or -fno-zero-initialized-in-bss to the compile flags cause the problem to return for 3.4.1, and then adding the -Wl,--stack option fix it again? cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/