Fix bug in previous fix for #5654
authorSimon Marlow <marlowsd@gmail.com>
Sat, 17 Dec 2016 23:08:48 +0000 (18:08 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sat, 17 Dec 2016 23:09:40 +0000 (18:09 -0500)
commit2a02040b2e23daa4f791afc290c33c9bbe3c620c
tree1772bef92c635cbc78ef8de85405c71ef648d2fe
parent343b1473fa3ad1f90e4f9708dbc4d8127382dc36
Fix bug in previous fix for #5654

I forgot to account for BCOs, which have a different layout from
functions.  This caused crashes when using profiling with GHCi (via
-fexternal-interpreter -prof), which unfortunately is not tested at all
by validate, even when profiling is enabled.  I'm going to add some
testing that would have caught this in a separate patch.

Test Plan:
```
cd nofib/spectral/puzzle && make NoFibWithGHCi=YES
EXTRA_RUNTEST_OPTS='-fexternal-interpreter -prof'
```
New testsuite tests coming in a separate diff.

Reviewers: niteria, austin, erikd, bgamari

Reviewed By: bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2868

GHC Trac Issues: #5654
rts/Apply.cmm