#5899: RTS crash w/ strange closure type 603975781 on OS X 10.8 -----------------------------------------------------------+---------------- Reporter: dylukes | Owner: Type: bug | Status: new Priority: high | Milestone: 7.4.2 Component: Runtime System | Version: 7.4.1 Keywords: rts, strange closure, internal error, os x | Os: MacOS X Architecture: x86_64 (amd64) | Failure: Runtime crash Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | -----------------------------------------------------------+----------------
Comment(by simonmar): I managed to reproduce the problem. I know what's going on, but I don't know how to fix it yet. So the problem is that in the binary, the linker has re-ordered some of the contents so that one particular info table is not next to its code any more: {{{ 000000010002cb88 t _base_GHCziIOziHandleziInternals_augmentIOError_info_dsp 000000010002cba0 T _base_GHCziIOziHandleziInternals_augmentIOError_info 000000010002cbe8 t _base_GHCziEventziInternal_evtNothing_info_dsp 000000010002cbf8 T _base_GHCziEventziInternal_evtNothing_info 000000010002cc88 t _base_GHCziBase_zd_info_dsp 000000010002cca0 t _base_GHCziIOziHandleziInternals_zdLr3Qxlvl8_info_dsp 000000010002ccb0 T _base_GHCziIOziHandleziInternals_zdLr3Qxlvl8_info 000000010002cd38 T _base_GHCziBase_zd_info }}} Note the symbol `_base_GHCziBase_zd_info_dsp` should be adjacent to `_base_GHCziBase_zd_info`, but the linker has placed some other stuff in between. These _dsp symbols are already special OS X magic that we insert to prevent the linker dropping things on the floor (IIRC, and this is horrible because it means the libraries on OS X have twice as many symbols as other platforms). These symbols are adjacent in the original object file: {{{ libHSbase-4.5.0.0.a(Base__45.o): 0000000000000028 D _base_GHCziBase_zd_closure 0000000000000018 T _base_GHCziBase_zd_info 0000000000000000 t _base_GHCziBase_zd_info_dsp U _stg_ap_p_fast }}} it seems like there ought to be a way to disable this behaviour with a linker flag, but I can't find one that works. I've tried `-no_order_inits` and `-no_order_data`. Help from OS X experts greatly appreciated... -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5899#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs