From: bdemsky Date: Wed, 29 Jun 2011 09:45:54 +0000 (+0000) Subject: fix potential bug with clear function X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=62d50261ebece2af03f8421bd9a178e146c2d7b5;p=IRC.git fix potential bug with clear function --- diff --git a/Robust/src/Runtime/bamboo/markbit.h b/Robust/src/Runtime/bamboo/markbit.h index acec1ae1..afe82af6 100644 --- a/Robust/src/Runtime/bamboo/markbit.h +++ b/Robust/src/Runtime/bamboo/markbit.h @@ -124,7 +124,6 @@ static inline void clearMark(void *ptr) { unsigned int bits=(index>48)?32:bitmarkmappingarray[index]; unsigned int bitstotoss=32-bits; gcmarktbl[hibits]^=((hipart>>(bitstotoss))<<(bitstotoss)); - } else { unsigned int orighi=gcmarktbl[hibits]; unsigned int hipart=orighi<>bitstotoss)<>lobits; - gcmarktbl[hibits+1]^=(lowpart>>bitstotoss)<<(bitstotoss+revlobits); + unsigned int xormask=(lowpart>>bitstotoss)<<(bitstotoss+revlobits); + if (xormask) + gcmarktbl[hibits+1]^=xormask; } }