#4012: Compilation results are not deterministic
-------------------------------+--------------------------------------------
  Reporter:  kili              |          Owner:                      
      Type:  bug               |         Status:  new                 
  Priority:  high              |      Milestone:  7.6.1               
 Component:  Compiler          |        Version:  6.12.2              
Resolution:                    |       Keywords:                      
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple    
   Failure:  Other             |     Difficulty:  Difficult (2-5 days)
  Testcase:                    |      Blockedby:                      
  Blocking:                    |        Related:                      
-------------------------------+--------------------------------------------
Changes (by simonmar):

  * priority:  low => high


Old description:

> Short story: if you use ghc-6.12.1.20100318 (or similar, probably
> ghc-6.12.1 release will produce the same results) to bootstrap
> ghc-6.12, and then use that ghc-6.12 to bootstrap another ghc-6.12,
> those two instances of ghc-6.12 will have different ABI hashes and
> interfaces in the ghc package. If you use ghc-6.10 for the
> bootstrapping, you'll even get differences in the ghc, base and
> Cabal packages.
>
> Long story: see logfiles and descriptions at http://darcs.volkswurst.de
> /boot-tests/ (note that the logfiles are quite large, I really don't want
> to attach 150 MB of logs to this ticket).

New description:

 There are some issues with non-determinism in the output of GHC, which
 means that compilations are not repeatable.  This affects some users (e.g.
 Debian packagers) who need to be able to get repeatable hashes for the
 packages of a GHC build.

 The cases we know about that lead to non-deterministic results are:

  * The `spec_ids` (specialised Ids) attached to an Id have a non-
 deterministic ordering
  * CSE can give different results depending on the order in which the
 bindings are considered, and since the ordering is non-deterministic, the
 result of CSE is also non-deterministic.  e.g. in `x = z; y = z; z = 3`,
 where `y` and `x` are exported, we can end up with either `x = y; y = 3`
 or `y = x; x = 3`.
  * There seems to be something unpredictable about the order of arguments
 to SpecConstr-generated specialisations, see
 [http://www.haskell.org/pipermail/glasgow-haskell-
 users/2011-April/020287.html]
  * The wrappers generated by the `CApiFFI` extension have non-
 deterministic names. (see comment:15 below).

 '''Old ticket description follows'''

 Short story: if you use ghc-6.12.1.20100318 (or similar, probably
 ghc-6.12.1 release will produce the same results) to bootstrap
 ghc-6.12, and then use that ghc-6.12 to bootstrap another ghc-6.12,
 those two instances of ghc-6.12 will have different ABI hashes and
 interfaces in the ghc package. If you use ghc-6.10 for the
 bootstrapping, you'll even get differences in the ghc, base and
 Cabal packages.

 Long story: see logfiles and descriptions at http://darcs.volkswurst.de
 /boot-tests/ (note that the logfiles are quite large, I really don't want
 to attach 150 MB of logs to this ticket).

--

Comment:

 I've updated the description following the latest evidence.  Let's try to
 do something about this for the next major release.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4012#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to