Untag the potential AP_STACK in stg_getApStackValzh
authorJames Clarke <jrtc27@jrtc27.com>
Wed, 18 Oct 2017 20:33:28 +0000 (16:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 19 Oct 2017 20:40:09 +0000 (16:40 -0400)
commitb6204f70501ec4ce4015503421c8a83c6f0fa008
treee2d5b6daa6738a582700405235cb58a6c7bf6ddd
parent098dc97b80768a6aeabce4eb6d6d7e6e9a9a75b6
Untag the potential AP_STACK in stg_getApStackValzh

If the AP_STACK has been evaluated and a GC has run, the BLACKHOLE
indirection will have been removed, and the StablePtr for the original
AP_STACK referred to be GHCi will therefore now point directly to the
value, and may be tagged. Add a hist002 test for this, and make sure
hist001 doesn't do an idle GC, so the case when it's still a BLACKHOLE
is definitely also tested.

Reviewers: austin, bgamari, erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D4099
rts/PrimOps.cmm
testsuite/tests/ghci.debugger/scripts/all.T
testsuite/tests/ghci.debugger/scripts/hist002.script [new file with mode: 0644]
testsuite/tests/ghci.debugger/scripts/hist002.stdout [new file with mode: 0644]