[GHC] #12935: Object code produced by GHC is non-deterministic
GHC
ghc-devs at haskell.org
Wed Feb 7 02:14:04 UTC 2018
#12935: Object code produced by GHC is non-deterministic
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by nh2):
I have attached some files, `objdump-headers-1.txt` and `objdump-
headers-1.txt` which are the outputs of `objdump --all-headers Example.o`
as produced by `ghc --make -j1` of a project of mine.
Have a look at them in a diff viewer.
At the top you will find probably what was talked about before: Uniques
making it into symbol names, like `cZoQ_info` vs `cQJU_info`.
But further down you see
{{{
0000000000002f10 R_X86_64_PC32 .data.rel.ro+0x00000000000000e8
}}}
vs
{{{
0000000000002f10 R_X86_64_PC32 .data.rel.ro+0x00000000000000f0
}}}
which is the result of some values in the `RELOCATION RECORDS FOR
[.data.rel.ro]` having their positions swapped:
{{{
0000000000000100 R_X86_64_64
monozmtraversablezm1zi0zi2zi1zm4aNtRX1lKHJF1rNRp4LmtV_DataziMonoTraversable_zdfMonoFoldableZMZN_closure
0000000000000108 R_X86_64_64
monozmtraversablezm1zi0zi2zi1zm4aNtRX1lKHJF1rNRp4LmtV_DataziMonoTraversableziUnprefixed_any_closure
}}}
vs
{{{
0000000000000100 R_X86_64_64
monozmtraversablezm1zi0zi2zi1zm4aNtRX1lKHJF1rNRp4LmtV_DataziMonoTraversableziUnprefixed_any_closure
0000000000000108 R_X86_64_64
monozmtraversablezm1zi0zi2zi1zm4aNtRX1lKHJF1rNRp4LmtV_DataziMonoTraversable_zdfMonoFoldableZMZN_closure
}}}
These are the same things, they have exactly the same symbol names, just
their order swapped.
How might this happen?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12935#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list