[commit: ghc] master: In the DEBUG rts, track when CAFs are GC'd (e82fa82)

git at git.haskell.org git at git.haskell.org
Thu Nov 21 13:28:06 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e82fa82933e6984c5b9507a0d857b0c579bd0f46/ghc

>---------------------------------------------------------------

commit e82fa82933e6984c5b9507a0d857b0c579bd0f46
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Thu Nov 21 11:28:13 2013 +0000

    In the DEBUG rts, track when CAFs are GC'd
    
    This resurrects some old code and makes it work again.  The idea is
    that we want to get an error message if we ever enter a CAF that has
    been GC'd, rather than following its indirection which will likely
    cause a segfault.  Without this patch, these bugs are hard to track
    down in gdb, because the IND_STATIC code overwrites R1 (the pointer to
    the CAF) with its indirectee before jumping into bad memory, so we've
    lost the address of the CAF that got GC'd.
    
    Some associated refactoring while I was here.


>---------------------------------------------------------------

e82fa82933e6984c5b9507a0d857b0c579bd0f46
 includes/rts/storage/GC.h   |    4 ++--
 includes/stg/MiscClosures.h |    1 +
 rts/StgMiscClosures.cmm     |    7 ++++++
 rts/sm/GC.c                 |   56 +++++++++++++++++++++----------------------
 rts/sm/GCAux.c              |   10 ++++----
 rts/sm/Storage.c            |   52 +++++++++++++++++++++++++++-------------
 rts/sm/Storage.h            |   24 +++++++++++++++++--
 7 files changed, 99 insertions(+), 55 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e82fa82933e6984c5b9507a0d857b0c579bd0f46


More information about the ghc-commits mailing list