public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* program crash after using -pg option?
@ 2010-03-03 13:26 David Jacobs
  2010-03-03 14:50 ` Tim Prince
  0 siblings, 1 reply; 2+ messages in thread
From: David Jacobs @ 2010-03-03 13:26 UTC (permalink / raw)
  To: gcc-help

Hello,

I'm having some problems using the -pg option to gather profiling data.
It's the first time I use this option, so I might be overlooking 
something obvious. :-)

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.

Any idea where to look for?

Cheers,
David

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: program crash after using -pg option?
  2010-03-03 13:26 program crash after using -pg option? David Jacobs
@ 2010-03-03 14:50 ` Tim Prince
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Prince @ 2010-03-03 14:50 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-03 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 13:26 program crash after using -pg option? David Jacobs
2010-03-03 14:50 ` Tim Prince

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).