Fix a bug with mallocForeignPtr and finalizers (#10904)
authorSimon Marlow <marlowsd@gmail.com>
Wed, 23 Sep 2015 09:01:23 +0000 (10:01 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 24 Sep 2015 07:43:56 +0000 (08:43 +0100)
commit2440e3c6b479ac532e2660374a78c8482e903bed
tree3176ad7057f226a57186c505d4cd5ffc2f5b5283
parent39a262e53bab3b7cf827fa9f22226da5fca055be
Fix a bug with mallocForeignPtr and finalizers (#10904)

Summary: See Note [MallocPtr finalizers]

Test Plan: validate; new test T10904

Reviewers: ezyang, bgamari, austin, hvr, rwbarton

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1275
libraries/base/GHC/ForeignPtr.hs
rts/sm/MarkWeak.c
testsuite/tests/rts/T10904.hs [new file with mode: 0644]
testsuite/tests/rts/T10904lib.c [new file with mode: 0644]
testsuite/tests/rts/all.T