Fix endian issues in ghc-heap
authorPeter Trommler <ptrommler@acm.org>
Thu, 26 Jul 2018 21:23:22 +0000 (17:23 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 27 Jul 2018 16:29:40 +0000 (12:29 -0400)
commitd7cb1bbc26719cf6082abe0d91d80be466e25bfc
tree035d527212e19c58a4f9cd204cd2b4c313feda1f
parent40e9ec982a6f133243ca74ac7353b9be39e18c72
Fix endian issues in ghc-heap

In test heap_all arity and n_args were swapped on big endian
systems.

Take care of endianness when reading parts of a machine word
from a `Word`.

This fixes one out of 36 failing tests reported in #15399.

Test Plan: validate

Reviewers: simonmar, bgamari, hvr, erikd

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #15399

Differential Revision: https://phabricator.haskell.org/D5001
compiler/ghci/RtClosureInspect.hs
libraries/ghc-heap/GHC/Exts/Heap.hs