From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7184 invoked by alias); 3 Mar 2010 14:50:31 -0000 Received: (qmail 7141 invoked by uid 22791); 3 Mar 2010 14:50:27 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from imr-mb01.mx.aol.com (HELO imr-mb01.mx.aol.com) (64.12.207.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Mar 2010 14:50:23 +0000 Received: from mtaout-mb01.r1000.mx.aol.com (mtaout-mb01.r1000.mx.aol.com [172.29.41.65]) by imr-mb01.mx.aol.com (8.14.1/8.14.1) with ESMTP id o23EoJD0003634 for ; Wed, 3 Mar 2010 09:50:19 -0500 Received: from [192.168.1.75] (99-13-231-72.lightspeed.snjsca.sbcglobal.net [99.13.231.72]) by mtaout-mb01.r1000.mx.aol.com (WebSuites/MUA Thirdparty client Interface) with ESMTPA id B8633E009CA2 for ; Wed, 3 Mar 2010 09:36:20 -0500 (EST) Message-ID: <4B8E73E8.5010308@aol.com> Date: Wed, 03 Mar 2010 14:50:00 -0000 From: Tim Prince Reply-To: tprince@nospamcomputer.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: program crash after using -pg option? References: <4B8E639E.8060502@melexis.com> In-Reply-To: <4B8E639E.8060502@melexis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:352045056:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d29414b8e73e4248f X-AOL-IP: 99.13.231.72 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00040.txt.bz2 On 3/3/2010 5:26 AM, David Jacobs wrote: > > When I add the -pg option to both compiler and linker I get the > following errors while executing my program: > (compilation and linking is fine) > > -------------------- > 264 [main] TempLnrTransform 3568 _cygtls::handle_exceptions: > Exception: STATUS_ACCESS_VIOLATION > 6953 [main] TempLnrTransform 3568 open_stackdumpfile: Dumping stack > trace to TempLnrTransform.exe.stackdump > 947884 [main] TempLnrTransform 3568 _cygtls::handle_exceptions: > Exception: STATUS_ACCESS_VIOLATION > 981347 [main] TempLnrTransform 3568 _cygtls::handle_exceptions: Error > while dumping state (probably corrupted stack)/ > -------------------- > > /It seems the added functions of mcount are causing some problems? > The program runs fine without the -pg option. > You're getting well outside the area which is taken care of by gcc. Threading and profiling libraries aren't part of gcc. Threading is flaky enough in cygwin that there's a good chance the mcount isn't thread safe or some other problem comes up which hasn't been tested. While the situation may have improved, in the past I've submitted bugzillas about how profiling cases in the gcc testsuite were set up with specific options for various targets, giving the wrong options for cygwin, so that the test could not give a useful result, and been told that testsuite would not be corrected for this. I don't think there are tests there which combine -pg and threads, in case that is what you are doing. If it were possible to interest someone in this, you would need to submit a small reproducer on a cygwin specific list.