#8974: 64 bit windows executable built with ghc-7.9.20140405+LLVM segfaults -------------------------------------+------------------------------------- Reporter: awson | Owner: Type: bug | Status: infoneeded Priority: high | Milestone: 7.12.1 Component: Compiler (LLVM) | Version: 7.9 Resolution: | Keywords: Operating System: Windows | Architecture: x86_64 Type of failure: Runtime crash | (amd64) Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Fanael): It's not Windows, it's binutils being broken (nothing new). For example, LLVM emits this: {{{ .quad S1kt_srt$def-Main_main1_info$def # @"Main_main1_info$def" .quad 4294967299 # 0x100000003 .quad 0 # 0x0 .quad 64424509455 # 0xf0000000f Main_main1_info$def: }}} With GDB, we can learn that this value should equal {{{ (gdb) p ((char*)&S1kt_srt$def - (char*)&Main_main1_info$def) $1 = 3062336 }}} But what actually lands in the executable is {{{ (gdb) x/d Main_main1_info$def - 32 0x4015b0 <Main_main2_info$def+96>: 3062340 }}} Makes me wonder if binutils devs are aware of the problem. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8974#comment:27> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler