Index: /tags/ipp-20110622/psLib/src/sys/psMemory.c
===================================================================
--- /tags/ipp-20110622/psLib/src/sys/psMemory.c	(revision 32276)
+++ /tags/ipp-20110622/psLib/src/sys/psMemory.c	(revision 32277)
@@ -515,18 +515,32 @@
 	    continue;
 	}
-	if (memBlock->nextBlock && memBlock->nextBlock->inFlight) {
-	    // nope, we need to try again
-	    MUTEX_UNLOCK(&memBlockListMutex);
-	    usleep (BLOCK_SLEEP);
-	    retryLock ++;
-	    continue;
-	}
-	if (memBlock->previousBlock && memBlock->previousBlock->inFlight) {
-	    // nope, we need to try again
-	    MUTEX_UNLOCK(&memBlockListMutex);
-	    usleep (BLOCK_SLEEP);
-	    retryLock ++;
-	    continue;
-	}
+        if (memBlock->nextBlock && memBlock->nextBlock->inFlight) {
+            // we reply on the value of 'inFlight'.  we should crash if this block is corrupted
+            if (memBlock->nextBlock->startblock != P_PS_MEMMAGIC) {
+                PS_MEM_ABORT(__func__, "Unsafe to Continue\n");
+            }
+            if (memBlock->nextBlock->endblock != P_PS_MEMMAGIC) {
+                PS_MEM_ABORT(__func__, "Unsafe to Continue\n");
+            }
+            // nope, we need to try again
+            MUTEX_UNLOCK(&memBlockListMutex);
+            usleep (BLOCK_SLEEP);
+            retryLock ++;
+            continue;
+        }
+        if (memBlock->previousBlock && memBlock->previousBlock->inFlight) {
+            // we reply on the value of 'inFlight'.  we should crash if this block is corrupted
+            if (memBlock->previousBlock->startblock != P_PS_MEMMAGIC) {
+                PS_MEM_ABORT(__func__, "Unsafe to Continue\n");
+            }
+            if (memBlock->previousBlock->endblock != P_PS_MEMMAGIC) {
+                PS_MEM_ABORT(__func__, "Unsafe to Continue\n");
+            }
+            // nope, we need to try again
+            MUTEX_UNLOCK(&memBlockListMutex);
+            usleep (BLOCK_SLEEP);
+            retryLock ++;
+            continue;
+        }
 
 	// the markers are ours!
