
#11823: Undefined stg_sel_17_upd_info symbols on OS X -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc3 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Building GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Great, thanks everyone who contributed dumps. This is quite bizarre: the pattern match in question appears to be selecting the 20th field of a `GHCiState` constructor (citing the STG), {{{#!hs let { sat_s1rNg :: [GHC.Types.Char] = \u srt:SRT:[] [] case ipv146_s1rMI of _ { GHCi.UI.Monad.GHCiState _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ds36_s1rNa _ _ _ _ _ -> ds36_s1rNa; }; } in GHC.CString.unpackAppendCString# "'\n"# sat_s1rNg; }}} Somehow this emits this C--, {{{ c1Mzv: _s1rMI::P64 = P64[_s1rNh::P64 + 16]; I64[Hp - 16] = stg_sel_17_upd_info; P64[Hp] = _s1rMI::P64; _c1Mzq::P64 = Hp - 16; R3 = _c1Mzq::P64; R2 = c1Mzr_str; call GHC.CString.unpackAppendCString#_info(R3, R2) args: 8, res: 0, upd: 8; }}} Which is truly strange in light of the check in `mkRhsClosure`, {{{#!hs mkRhsClosure dflags bndr _cc _bi [NonVoid the_fv] upd_flag [] expr | let strip = snd . stripStgTicksTop (not . tickishIsCode) , StgCase (StgApp scrutinee [{-no args-}]) _ -- ignore bndr (AlgAlt _) [(DataAlt _, params, sel_expr)] <- strip expr , StgApp selectee [{-no args-}] <- strip sel_expr , the_fv == scrutinee -- Scrutinee is the only free variable , let (_, _, params_w_offsets) = mkVirtConstrOffsets dflags (addIdReps params) -- Just want the layout , Just the_offset <- assocMaybe params_w_offsets (NonVoid selectee) , let offset_into_int = bytesToWordsRoundUp dflags the_offset - fixedHdrSizeW dflags , offset_into_int <= mAX_SPEC_SELECTEE_SIZE dflags -- Offset is small enough = let lf_info = mkSelectorLFInfo bndr offset_into_int (isUpdatable upd_flag) in cgRhsStdThunk bndr lf_info [StgVarArg the_fv] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11823#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler