Index: libcfa/src/concurrency/locks.hfa
===================================================================
--- libcfa/src/concurrency/locks.hfa	(revision a8b06184ebbf9c3366ebd42987b066a439809b2b)
+++ libcfa/src/concurrency/locks.hfa	(revision 07033ce5992363b8a9ebaeebb9ea9b449c96ad62)
@@ -21,5 +21,5 @@
 #include "bits/weakso_locks.hfa"
 #include "containers/queueLockFree.hfa"
-
+#include "limits.hfa"
 #include "thread.hfa"
 
@@ -85,4 +85,5 @@
 	bool tryP(BinaryBenaphore & this) {
 		ssize_t c = this.counter;
+		/* paranoid */ verify( c > MIN );
 		return (c >= 1) && __atomic_compare_exchange_n(&this.counter, &c, c-1, false, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
 	}
@@ -92,4 +93,5 @@
 		ssize_t c = 0;
 		for () {
+			/* paranoid */ verify( this.counter < MAX );
 			if (__atomic_compare_exchange_n(&this.counter, &c, c+1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
 				if (c == 0) return true;
Index: tests/unified_locking/fast.cfa
===================================================================
--- tests/unified_locking/fast.cfa	(revision a8b06184ebbf9c3366ebd42987b066a439809b2b)
+++ tests/unified_locking/fast.cfa	(revision 07033ce5992363b8a9ebaeebb9ea9b449c96ad62)
@@ -22,5 +22,5 @@
 uint32_t cs() {
 	$thread * me = active_thread();
-	uint32_t value = (uint32_t)me;
+	uint32_t value;
 	lock(mo.l);
 	{
@@ -28,4 +28,5 @@
 		mo.id = me;
 		yield(random(5));
+		value = ((uint32_t)random()) ^ ((uint32_t)me);
 		if(mo.id != me) sout | "Intruder!";
 		mo.sum = tsum + value;
