12166 – Profiled programs crash if PROFDIR is set (original) (raw)

Description Sean Johnston 2003-09-04 14:01:44 UTC

Programs compiled with profiling (-pg) will crash on termination and not write any output profile data. This occurs when the environment variable PROFDIR is set.

This bug appears to have been spotted and a patch provided some time ago, however the patch does not appear to be present in the 3.3 source tree. Here is a URL for the original patch which also contains a better description of the issue than I can manage:

http://gcc.gnu.org/ml/gcc-patches/1999-03n/msg00038.html

Comment 1 Sean Johnston 2003-09-18 11:08:37 UTC

The patch referenced in the original report has been tested and successfully resolves the issue.

Comment 2 Eric Botcazou 2003-09-18 11:49:51 UTC

Confirmed. Regression from egcs-1.1.1 according to Theodore.

Comment 3 Eric Botcazou 2003-09-18 11:51:00 UTC

Taking care of Theodore's patch.

Comment 4 Eric Botcazou 2003-09-18 12:19:27 UTC

The original patch doesn't work on SPARC64. The 'st' mnemonic should be replaced by the macro 'stn'.