diff options
| author | simonmar <unknown> | 2001-03-02 14:28:44 +0000 |
|---|---|---|
| committer | simonmar <unknown> | 2001-03-02 14:28:44 +0000 |
| commit | 18f73b07621d157c948ec6a86c173c9915712896 (patch) | |
| tree | 2747c69df00e65bf06d4581bc382846747e5a7f6 | |
| parent | 5cd7cb62dcbdabac9f728208362e1a32d1b82c39 (diff) | |
| download | haskell-18f73b07621d157c948ec6a86c173c9915712896.tar.gz | |
[project @ 2001-03-02 14:28:44 by simonmar]
Yet another good bug (I'm on a roll today! :-)
When squeezing update frames, make sure the updatee pointers aren't
identical before updating one to point to the other. This is mostly
harmless, but in one example I have caused the program to go into an
infinite loop rather than fall down a black hole.
To be merged into the 4.08 branch.
| -rw-r--r-- | ghc/rts/GC.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index a1bbf56c74..63526f1fc7 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.96 2001/02/11 17:51:07 simonmar Exp $ + * $Id: GC.c,v 1.97 2001/03/02 14:28:44 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -3342,7 +3342,10 @@ threadSqueezeStack(StgTSO *tso) * sorted out? oh yes: we aren't counting each enter properly * in this case. See the log somewhere. KSW 1999-04-21 */ - UPD_IND_NOLOCK(updatee_bypass, updatee_keep); /* this wakes the threads up */ + if (updatee_bypass != updatee_keep) { + /* this wakes the threads up */ + UPD_IND_NOLOCK(updatee_bypass, updatee_keep); + } sp = (P_)frame - 1; /* sp = stuff to slide */ displacement += sizeofW(StgUpdateFrame); |
