
#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 simonmar): My apologies for making a buggy test program :-) Thanks for eliminating the strangeness there. So it seems that `dlsym` always returns a bogus result for `environ`. Your proposed fix only works if we load libraries with `RTLD_LOCAL` rather than `RTLD_GLOBAL`, I think. That is probably fine, but it needs testing. This commit that introduced `internal_dlsym` explains the rationale: be497c202b790999c3fd0ddc4a4176b8cf6acf7e I'm fine with refactoring away the `hdl` argument. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8935#comment:29 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler