From 2dd7acda60a199eb1226f6218d98f2a5f14d6bc6 Mon Sep 17 00:00:00 2001 From: sof <unknown> Date: Mon, 24 Nov 1997 21:11:44 +0000 Subject: [PATCH] [project @ 1997-11-24 21:11:44 by sof] RBH_entry: GranSim/GUM fix for invalid InfoPtr --- ghc/runtime/main/StgThreads.lhc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc/runtime/main/StgThreads.lhc b/ghc/runtime/main/StgThreads.lhc index 0f9c6062d04d..ffd0286eb3ef 100644 --- a/ghc/runtime/main/StgThreads.lhc +++ b/ghc/runtime/main/StgThreads.lhc @@ -161,7 +161,11 @@ STGFUN(RBH_entry) STGCALL3(void,(),GranSimBlock,CurrentTSO,CurrentProc,Node); # endif - switch (INFO_TYPE(InfoPtr)) { + /* In GranSim and GUM on 2.04 the InfoPtr seems to be invalid when entering + this routine (exact reason is unknown). This change does the safe + thing instead. -- HWL */ + + switch (INFO_TYPE(INFO_PTR(Node))) { /* HWL orig: INFO_TYPE(InfoPtr) */ case INFO_SPEC_RBH_TYPE: TSO_LINK(CurrentTSO) = (P_) SPEC_RBH_BQ(Node); SPEC_RBH_BQ(Node) = (W_) CurrentTSO; -- GitLab