Ticket #2323 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

Segfaulting binary only with modules

Reported by: yrn1 Owned by:
Priority: normal Milestone: 6.10.1
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: MacOS X Architecture: powerpc
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

tgz with 2 files attached: Math.hs and Main.hs. Math.hs contains some utility functions and Main.hs uses them. When compiling this (ghc --make Main) and running ./Main, it segfaults. But when putting everything from Math.hs in Main.hs (and hence eliminating the Math module) and compiling again, it does not segfault.

Note removing that the PRAGMA's in the Math.hs file does not change this behaviour.

Attachments

test.tgz Download (0.9 KB) - added by yrn1 5 years ago.

Change History

Changed 5 years ago by yrn1

Changed 5 years ago by igloo

  • difficulty set to Unknown
  • milestone set to 6.10.1

Good testcase, thanks! I can't reproduce the problem on amd64/Linux, but that's not too surprising. It would be useful to know if this is reproducible with PPC/OS X in the HEAD.

Changed 5 years ago by thorkilnaur

On a

$ uname -a
Darwin thorkil-naurs-mac-mini.local 9.3.0 Darwin Kernel Version 9.3.0: Fri May 23 00:51:20 PDT 2008; root:xnu-1228.5.18~1/RELEASE_PPC Power Macintosh

(which is a PPC Mac OS X 10.5.3 Leopard), I cannot reproduce this problem with a recent HEAD:

$ /Users/thorkilnaur/tn/buildbot/ghc/tnaur-ppc-osx-2/tnaur-ppc-osx-head-2/build/compiler/stage2/ghc-inplace --version  
The Glorious Glasgow Haskell Compilation System, version 6.9.20080607
$ /Users/thorkilnaur/tn/buildbot/ghc/tnaur-ppc-osx-2/tnaur-ppc-osx-head-2/build/compiler/stage2/ghc-inplace --make Main
[1 of 2] Compiling Math             ( Math.hs, Math.o ) 
[2 of 2] Compiling Main             ( Main.hs, Main.o ) 
Linking Main ...
$ ./Main
33

For completion, I have verified this using

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6.1

on the same machine and also using

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2

on another machine, a PPC Max OS X 10.4.11 Tiger:

$ uname -a
Darwin thorkil-naurs-mac-mini.local 9.3.0 Darwin Kernel Version 9.3.0: Fri May 23 00:51:20 PDT 2008; root:xnu-1228.5.18~1/RELEASE_PPC Power Macintosh

In no instances have I been able to reproduce this problem.

Best regards Thorkil

Changed 5 years ago by simonmar

  • status changed from new to closed
  • resolution set to worksforme

I'm also unable to reproduce on x86_64/Linux.

Note: See TracTickets for help on using tickets.