[GHC] #10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -----------------------------------------+------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: GHCi | Version: 7.10.2 Keywords: | Operating System: MacOS X Architecture: x86_64 (amd64) | Type of failure: GHCi crash Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------------+------------------------------- Starting ghci as: {{{ env DYLD_FORCE_FLAT_NAMESPACE=1 ghci }}} can cause symbol resolution to fail. I tried with Data.Hashable as follows: {{{ import Data.Hashable main = putStrLn $ show $ hashWithSalt 0 "foo" }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------+----------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+----------------------------------------- Changes (by jacereda): * Attachment "0001-Fix-for-improper-name-resolution-on-Darwin-when- usin.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------+----------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: GHCi | Version: 7.10.2 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 (amd64) Type of failure: GHCi crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------+----------------------------------------- Changes (by jacereda): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by jacereda): * failure: GHCi crash => Runtime crash * component: GHCi => Runtime System (Linker) Old description:
Starting ghci as:
{{{ env DYLD_FORCE_FLAT_NAMESPACE=1 ghci }}}
can cause symbol resolution to fail. I tried with Data.Hashable as follows:
{{{ import Data.Hashable main = putStrLn $ show $ hashWithSalt 0 "foo" }}}
New description: The following command: {{{ env DYLD_FORCE_FLAT_NAMESPACE=1 ghc -e 'Data.Hashable.hashWithSalt 0 "foo"' }}} causes symbol resolution to fail. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Changes (by jacereda): * Attachment "0002-Test-failed-to-compile-due-to-use-of-non-standard- he.patch" added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by thomie): Thanks for the patch. Please note: * Patches should be made relative to ghc HEAD (master). * Your first patch doesn't have a test. See https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding * Your second patch isn't needed for ghc HEAD, see #10211. * Patches are preferably sent to [wiki:Phabricator]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by jacereda): Just finished compiling HEAD. Will resend the patches to Phabricator. As for the test, I'm not sure how to handle that. I guess adding Data.Hashable to the suite just for this is overkill... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => new Comment: Moving out of review queue, see comment:3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ak3n): There is no such error with GHC 7.10.3 and Mac OS X 10.11.4. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by jacereda): I just tried again with 7.10.3 on 10.10.5 and it's failing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by jacereda): Feel free to close it anyways if you consider it appropriate, by the time I'll need this I'll probably be on 10.11. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by jacereda): Just upgraded to 10.11 and 7.10.3 works fine here. Should it be closed? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: closed Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ak3n): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10914: Bad symbol resolution on Darwin when using DYLD_FORCE_FLAT_NAMESPACE=1 -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: closed Priority: high | Milestone: Component: Runtime System | Version: 7.10.2 (Linker) | Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by jacereda): I found out the reason why this no longer fails on 10.11: http://apple.stackexchange.com/questions/193368/what-is-the-rootless- feature-in-el-capitan-really Looks like dyld environment variables are simply ignored now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10914#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC