From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30415 invoked by alias); 11 Apr 2011 11:58:13 -0000 Received: (qmail 30402 invoked by uid 22791); 11 Apr 2011 11:58:12 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_BF X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 11 Apr 2011 11:58:07 +0000 Received: (qmail invoked by alias); 11 Apr 2011 11:58:04 -0000 Received: from LN-mac29.grenoble.cnrs.fr (EHLO axel) [147.173.67.29] by mail.gmx.net (mp059) with SMTP; 11 Apr 2011 13:58:04 +0200 Date: Mon, 11 Apr 2011 11:58:00 -0000 From: Axel Freyn To: Michael Matz Cc: Dominique Dhumieres , paul.richard.thomas@gmail.com, gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: Implement stack arrays even for unknown sizes Message-ID: <20110411115801.GJ3858@axel> Mail-Followup-To: Michael Matz , Dominique Dhumieres , paul.richard.thomas@gmail.com, gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org References: <20110409100809.BF9CD3BE18@mailhost.lps.ens.fr> <20110410132925.5B1493BE18@mailhost.lps.ens.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00744.txt.bz2 Hi, On Mon, Apr 11, 2011 at 01:49:16PM +0200, Michael Matz wrote: > Hi, > > On Sun, 10 Apr 2011, Dominique Dhumieres wrote: > > > > I find that both nf.f90 and capacita.f90 segfault in runtime for any stack size. > > > > On x86_64-apple-darwin10, nf.f90 "works". However if I run it through > > valgrind I get > > > > ==64815== Memcheck, a memory error detector > > ==64815== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. > > ==64815== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info > > ==64815== Command: a.out --max-stackframe=2118496 > > ==64815== > > ==64815== Warning: set address range perms: large range [0x7ffe6c000000, 0x7fff5bc01000) (defined) > > ==64815== Warning: client switching stacks? SP change: 0x7fff5bffe410 --> 0x7fff5be0cef0 > > ==64815== to suppress, use: --max-stackframe=2037024 or greater > > See? That's whay I meant with having to use a large ulimit for stack > size. Usually stack overflows symptom is a simple segfault. What ulimit > -s have you used for your capacita tests? Just a small remark: according to the message from valgrind, the "max-stackframe" parameter is at the WRONG position. It has to be valgrind --max-stackframe=2118496 ./a.out and NOT valgrind ./a.out --max-stackframe=2118496 (the second way, valgrind ignores "max-stackframe" and passes it as parameter to ./a.out. According to the valgrind-output, you passed the parameter AFTER the "./a.out". That might explain the problem? Axel