
#8935: Obscure linker bug leads to crash in GHCi -------------------------------------+------------------------------------ Reporter: simonmar | Owner: simonmar Type: bug | Status: infoneeded Priority: high | Milestone: 7.8.3 Component: Runtime System | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: GHCi crash | Difficulty: Rocket Science Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by trommler): And another question: From `internal_dlopen()`: {{{ if (hdl == NULL) { /* dlopen failed; return a ptr to the error msg. */ errmsg = dlerror(); if (errmsg == NULL) errmsg = "addDLL: unknown error"; errmsg_copy = stgMallocBytes(strlen(errmsg)+1, "addDLL"); strcpy(errmsg_copy, errmsg); errmsg = errmsg_copy; } o_so = stgMallocBytes(sizeof(OpenedSO), "addDLL"); o_so->handle = hdl; o_so->next = openedSOs; openedSOs = o_so; }}} If dlopen() fails we are adding a `NULL` handle to `openedSOs`. Which on my system means `RTLD_DEFAULT`. Is that what we want? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8935#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler