From: bdemsky Date: Sat, 7 Feb 2009 01:58:26 +0000 (+0000) Subject: fix random bugs X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=da8916d66d2039fda5469b4b452ee9e8d48a2223;p=IRC.git fix random bugs --- diff --git a/Robust/src/Runtime/DSTM/interface/clookup.c b/Robust/src/Runtime/DSTM/interface/clookup.c index 33aab6b3..724086d1 100644 --- a/Robust/src/Runtime/DSTM/interface/clookup.c +++ b/Robust/src/Runtime/DSTM/interface/clookup.c @@ -140,7 +140,6 @@ unsigned int chashResize(chashtable_t *table, unsigned int newsize) { table->table = node; //Update the global hashtable upon resize() table->size = newsize; table->mask = (newsize << 1)-1; - table->numelements = 0; for(i = 0; i < oldsize; i++) { //Outer loop for each bin in hash table curr = &ptr[i]; diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index 6b896083..135951f6 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -405,6 +405,7 @@ __attribute__((pure)) objheader_t *transRead(transrecord_t *record, unsigned int #ifdef ABORTREADERS if (record->abort) { //abort this transaction + printf("ABORTING\n"); _longjmp(record->aborttrans,1); } else addtransaction(oid,record); @@ -461,7 +462,6 @@ __attribute__((pure)) objheader_t *transRead(transrecord_t *record, unsigned int #ifdef TRANSSTATS nRemoteSend++; #endif - STATUS(objcopy)=0; #ifdef COMPILER return &objcopy[1]; #else @@ -707,6 +707,7 @@ int transCommit(transrecord_t *record) { objheader_t * header; header = (objheader_t *)(((char *)newAddr) + offset); oidToPrefetch = OID(header); + STATUS(header)=0; int size = 0; GETSIZE(size, header); size += sizeof(objheader_t); @@ -999,6 +1000,7 @@ void *getRemoteObj(transrecord_t *record, unsigned int mnum, unsigned int oid) { recv_data(sd, &size, sizeof(int)); objcopy = objstrAlloc(record->cache, size); recv_data(sd, objcopy, size); + STATUS(objcopy)=0; /* Insert into cache's lookup table */ chashInsert(record->lookupTable, oid, objcopy); }