Skip to content
Snippets Groups Projects
Commit 30a4bcc3 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Ben Gamari
Browse files

Fix processHeapClosureForDead CONSTR_NOCAF case

CONSTR_NOCAF was introduced with 55d535da 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 2625f131)
parent 1cdc3ecc
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,7 @@ processHeapClosureForDead( const StgClosure *c ) ...@@ -101,6 +101,7 @@ processHeapClosureForDead( const StgClosure *c )
case CONSTR_2_0: case CONSTR_2_0:
case CONSTR_1_1: case CONSTR_1_1:
case CONSTR_0_2: case CONSTR_0_2:
case CONSTR_NOCAF:
case FUN: case FUN:
case FUN_1_0: case FUN_1_0:
case FUN_0_1: case FUN_0_1:
...@@ -130,7 +131,6 @@ processHeapClosureForDead( const StgClosure *c ) ...@@ -130,7 +131,6 @@ processHeapClosureForDead( const StgClosure *c )
case IND_STATIC: case IND_STATIC:
case FUN_STATIC: case FUN_STATIC:
case THUNK_STATIC: case THUNK_STATIC:
case CONSTR_NOCAF:
// stack objects // stack objects
case UPDATE_FRAME: case UPDATE_FRAME:
case CATCH_FRAME: case CATCH_FRAME:
...@@ -139,6 +139,9 @@ processHeapClosureForDead( const StgClosure *c ) ...@@ -139,6 +139,9 @@ processHeapClosureForDead( const StgClosure *c )
case RET_BCO: case RET_BCO:
case RET_SMALL: case RET_SMALL:
case RET_BIG: case RET_BIG:
case CATCH_STM_FRAME:
case CATCH_RETRY_FRAME:
case ATOMICALLY_FRAME:
// others // others
case INVALID_OBJECT: case INVALID_OBJECT:
case COMPACT_NFDATA: case COMPACT_NFDATA:
......
...@@ -34,8 +34,7 @@ test('T3001', [only_ways(['prof_hb']), extra_ways(['prof_hb'])], ...@@ -34,8 +34,7 @@ test('T3001', [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
compile_and_run, ['']) compile_and_run, [''])
test('T3001-2', test('T3001-2',
[only_ways(['prof_hb']), extra_ways(['prof_hb']), [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
when(wordsize(32), expect_broken(15063))],
compile_and_run, ['-package bytestring']) compile_and_run, ['-package bytestring'])
# For profasm/profthreaded, the answer is correct but the ordering of some # For profasm/profthreaded, the answer is correct but the ordering of some
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment