[commit: ghc] ghc-8.6: Fix processHeapClosureForDead CONSTR_NOCAF case (30a4bcc)
git at git.haskell.org
git at git.haskell.org
Sat Jul 14 18:58:03 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/30a4bcc3fc3a434b3b6ab64289934281591ce09a/ghc
>---------------------------------------------------------------
commit 30a4bcc3fc3a434b3b6ab64289934281591ce09a
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: Fri Jul 13 15:12:19 2018 +0300
Fix processHeapClosureForDead CONSTR_NOCAF case
CONSTR_NOCAF was introduced with 55d535da10d as a replacement for
CONSTR_STATIC and CONSTR_NOCAF_STATIC, however, as explained in Note
[static constructors], we copy CONSTR_NOCAFs (which can also be seen in
evacuate) during GC, and they can become dead, like other CONSTR_X_Ys.
processHeapClosureForDead is updated to reflect this.
Test Plan: Validates on x86_64. Existing failures on i386.
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar, bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #7836, #15063, #15087, #15165
Differential Revision: https://phabricator.haskell.org/D4928
(cherry picked from commit 2625f1310edeff62eb3876cc6efbe105a80fe4ad)
>---------------------------------------------------------------
30a4bcc3fc3a434b3b6ab64289934281591ce09a
rts/LdvProfile.c | 5 ++++-
testsuite/tests/profiling/should_run/all.T | 3 +--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c
index 9499fdb..608961e 100644
--- a/rts/LdvProfile.c
+++ b/rts/LdvProfile.c
@@ -101,6 +101,7 @@ processHeapClosureForDead( const StgClosure *c )
case CONSTR_2_0:
case CONSTR_1_1:
case CONSTR_0_2:
+ case CONSTR_NOCAF:
case FUN:
case FUN_1_0:
case FUN_0_1:
@@ -130,7 +131,6 @@ processHeapClosureForDead( const StgClosure *c )
case IND_STATIC:
case FUN_STATIC:
case THUNK_STATIC:
- case CONSTR_NOCAF:
// stack objects
case UPDATE_FRAME:
case CATCH_FRAME:
@@ -139,6 +139,9 @@ processHeapClosureForDead( const StgClosure *c )
case RET_BCO:
case RET_SMALL:
case RET_BIG:
+ case CATCH_STM_FRAME:
+ case CATCH_RETRY_FRAME:
+ case ATOMICALLY_FRAME:
// others
case INVALID_OBJECT:
case COMPACT_NFDATA:
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index 5ee45c3..8d605f2 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -34,8 +34,7 @@ test('T3001', [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
compile_and_run, [''])
test('T3001-2',
- [only_ways(['prof_hb']), extra_ways(['prof_hb']),
- when(wordsize(32), expect_broken(15063))],
+ [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
compile_and_run, ['-package bytestring'])
# For profasm/profthreaded, the answer is correct but the ordering of some
More information about the ghc-commits
mailing list