logo       

[ ghc-Bugs-1209129 ] program seqfaults when translated with profiling: msg#00010

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-1209129 ] program seqfaults when translated with profiling

Bugs item #1209129, was opened at 2005-05-26 13:01
Message generated for change (Comment added) made by simonmar
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1209129&group_id=8032

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compiler
Group: 6.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: C Maeder (c_maeder)
Assigned to: Nobody/Anonymous (nobody)
Summary: program seqfaults when translated with profiling

Initial Comment:
The following program seqfaults when translated with
profiling under linux und with ghc-6.4 and ghc-6.4.1.

If I omit the last element of the string list or if I
use the list directly (without the definitiion of the
constant "mainS") the problem is gone. Also ghc-6.2.2
does not have the problem.

maeder@jupiter -> ghc --version
The Glorious Glasgow Haskell Compilation System,
version 6.4.1.20050517

maeder@jupiter -> ghc --make -prof -auto-all
seqfault.hs -no-recomp
Chasing modules from: seqfault.hs
Compiling Main ( seqfault.hs, seqfault.o )
Linking ...

maeder@jupiter -> ./a.out
Segmentation fault

maeder@jupiter -> uname -a
Linux jupiter 2.6.8-24.14-smp #1 SMP Tue Mar 29
09:27:43 UTC 2005 i686 i686 i386GNU/Linux


----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2005-06-03 10:10

Message:
Logged In: YES
user_id=48280

This is an interesting bug.

The code generated for the program with profiling on causes
the gcc to use up more than the available 8k of C stack
space we reserve for it.

There are various workarounds: using gcc-4.0.0 works, also
using -fasm works (and the code generated by the NCG is much
better than gcc, incedentally).

Just bumping the 8k would just make the bug less likely to
happen. I've installed an error message in the mangler to
help catch this in the future. This isn't a fix as such,
but it means we won't get segfaults in the future.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1209129&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise