Ticket #5132 (closed bug: fixed)

Opened 2 years ago

Last modified 21 months ago

Segfault on OS X in GHCi when using GHC API

Reported by: nominolo Owned by: igloo
Priority: high Milestone: 7.4.1
Component: GHCi Version: 7.0.2
Keywords: Cc: pho@…, jcpetruzza@…
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: GHCi crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

(This might be related to #5072.)

I get a segfault when loading and running the following simple program in GHCi:

import GHC
import DynFlags

main = do
  defaultErrorHandler defaultDynFlags $ do
    (a,b) <- parseStaticFlags []
    print "42"
$ ghci -package ghc bug3.hs
GHCi, version 7.0.2: http://www.haskell.org/ghc/  :? for help

Ok, modules loaded: Main.
Prelude Main> main
Bus error

It works fine on x86-64 linux or when I compile the code. I have not tested whether it fails on x86 as well.

Change History

Changed 2 years ago by igloo

  • owner set to igloo
  • priority changed from normal to high
  • milestone set to 7.2.1

This is probably the same as #5031.

Changed 2 years ago by PHO

  • cc pho@… added

Changed 2 years ago by jcpetruzza

  • cc jcpetruzza@… added

Changed 22 months ago by igloo

  • milestone changed from 7.2.1 to 7.4.1

Changed 21 months ago by igloo

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

I can reproduce this with 7.0.4:

*Main> main
Bus error: 10

but not with the 7.2.1 release build, nor (after changing defaultDynFlags to defaultLogAction) with my HEAD validate build.

So I think this is fixed, although I don't know by what change.

Note: See TracTickets for help on using tickets.