Skip to content

Fix non power-of-two Storable.alignment in Capi_Ctype tests

Daniel Gröber (dxld) requested to merge DanielG/ghc:ghc.alignment into master

Alignments passed to alloca and friends must be a power of two for the code in allocatePinned to work properly. Commit 41230e26 ("Zero out pinned block alignment slop when profiling") introduced an ASSERT for this but this test was still violating it.

I also update the documentation for Storable.alignment, ByteArray# primops and while I'm at it document the ByteArray# size rounding as requested by #14731 (closed).

  • are either individually buildable or squashed
  • have commit messages which describe what they do
  • have added source comments describing your change.
  • add a testcase to the testsuite.

Merge request reports