Skip to content

Draft: Allow ByteArray# objects outside of HEAP_ALLOCED() (implement issue #17747)

Duncan Coutts requested to merge dcoutts/ghc:wip/T17747 into master

This implement the feature requested in issue #17747

The feature is to be able to have byte array heap objects that are not HEAP_ALLOCED().

It appears that the only thing we need to do is to extend evacuate() (in rts/sm/Evac.c) so that in the !HEAP_ALLOCED_GC(q) case it appropriately handles the ARR_WORDS closure type.

The first patch makes tha one-line change in evacuate() and the second patch adds a test which fails with older ghc and passes with the first patch. See the patch and test description for details on the test.

Checklist:

  • 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.
Edited by Andreas Klebinger

Merge request reports