projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix crash in nested callbacks (#4038)
[ghc-hetmet.git]
/
rts
/
RetainerProfile.c
diff --git
a/rts/RetainerProfile.c
b/rts/RetainerProfile.c
index
ba4d146
..
07a3db4
100644
(file)
--- a/
rts/RetainerProfile.c
+++ b/
rts/RetainerProfile.c
@@
-453,8
+453,6
@@
push( StgClosure *c, retainer c_child_r, StgClosure **first_child )
// no child, no SRT
case CONSTR_0_1:
case CONSTR_0_2:
// no child, no SRT
case CONSTR_0_1:
case CONSTR_0_2:
- case CAF_BLACKHOLE:
- case BLACKHOLE:
case ARR_WORDS:
*first_child = NULL;
return;
case ARR_WORDS:
*first_child = NULL;
return;
@@
-468,8
+466,7
@@
push( StgClosure *c, retainer c_child_r, StgClosure **first_child )
*first_child = ((StgSelector *)c)->selectee;
return;
case IND_PERM:
*first_child = ((StgSelector *)c)->selectee;
return;
case IND_PERM:
- case IND_OLDGEN_PERM:
- case IND_OLDGEN:
+ case BLACKHOLE:
*first_child = ((StgInd *)c)->indirectee;
return;
case CONSTR_1_0:
*first_child = ((StgInd *)c)->indirectee;
return;
case CONSTR_1_0:
@@
-916,16
+913,12
@@
pop( StgClosure **c, StgClosure **cp, retainer *r )
// no child (fixed), no SRT
case CONSTR_0_1:
case CONSTR_0_2:
// no child (fixed), no SRT
case CONSTR_0_1:
case CONSTR_0_2:
- case CAF_BLACKHOLE:
- case BLACKHOLE:
case ARR_WORDS:
// one child (fixed), no SRT
case MUT_VAR_CLEAN:
case MUT_VAR_DIRTY:
case THUNK_SELECTOR:
case IND_PERM:
case ARR_WORDS:
// one child (fixed), no SRT
case MUT_VAR_CLEAN:
case MUT_VAR_DIRTY:
case THUNK_SELECTOR:
case IND_PERM:
- case IND_OLDGEN_PERM:
- case IND_OLDGEN:
case CONSTR_1_1:
// cannot appear
case PAP:
case CONSTR_1_1:
// cannot appear
case PAP:
@@
-1059,13
+1052,13
@@
isRetainer( StgClosure *c )
case FUN_0_2:
// partial applications
case PAP:
case FUN_0_2:
// partial applications
case PAP:
- // blackholes
- case CAF_BLACKHOLE:
- case BLACKHOLE:
// indirection
case IND_PERM:
// indirection
case IND_PERM:
- case IND_OLDGEN_PERM:
- case IND_OLDGEN:
+ // IND_STATIC used to be an error, but at the moment it can happen
+ // as isAlive doesn't look through IND_STATIC as it ignores static
+ // closures. See trac #3956 for a program that hit this error.
+ case IND_STATIC:
+ case BLACKHOLE:
// static objects
case CONSTR_STATIC:
case FUN_STATIC:
// static objects
case CONSTR_STATIC:
case FUN_STATIC:
@@
-1080,8
+1073,6
@@
isRetainer( StgClosure *c )
//
// Error case
//
//
// Error case
//
- // IND_STATIC cannot be *c, *cp, *r in the retainer profiling loop.
- case IND_STATIC:
// CONSTR_NOCAF_STATIC
// cannot be *c, *cp, *r in the retainer profiling loop.
case CONSTR_NOCAF_STATIC:
// CONSTR_NOCAF_STATIC
// cannot be *c, *cp, *r in the retainer profiling loop.
case CONSTR_NOCAF_STATIC: