|
From: <sv...@va...> - 2007-10-30 23:59:17
|
Author: sewardj
Date: 2007-10-30 23:59:15 +0000 (Tue, 30 Oct 2007)
New Revision: 7060
Log:
Fix assertion failure and bogus error message exposed by
tc20_verifywrap.
Modified:
branches/THRCHECK/thrcheck/tc_intercepts.c
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/thrcheck/tc_intercepts.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_intercepts.c 2007-10-30 23:56:42 UTC (rev 7059)
+++ branches/THRCHECK/thrcheck/tc_intercepts.c 2007-10-30 23:59:15 UTC (rev 7060)
@@ -37,6 +37,12 @@
/* RUNS ON SIMULATED CPU
Interceptors for pthread_* functions, so that tc_main can see
significant thread events.
+
+ Important: when adding a function wrapper to this file, remember to
+ add a test case to tc20_verifywrap.c. A common cause of failure is
+ for wrappers to not engage on different distros, and
+ tc20_verifywrap essentially checks that each wrapper is really
+ doing something.
*/
#include "pub_tool_basics.h"
@@ -142,6 +148,8 @@
case EBUSY: return "EBUSY: Device or resource busy";
case ETIMEDOUT: return "ETIMEDOUT: Connection timed out";
case EDEADLK: return "EDEADLK: Resource deadlock would occur";
+ case EOPNOTSUPP: return "EOPNOTSUPP: Operation not supported on "
+ "transport endpoint"; /* honest, guv */
default: return "tc_intercepts.c: lame_strerror(): "
"unhandled case -- please fix me!";
}
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-30 23:56:42 UTC (rev 7059)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-30 23:59:15 UTC (rev 7060)
@@ -5812,6 +5812,7 @@
TC_(deleteBag)( lk->heldBy );
lk->heldBy = NULL;
lk->heldW = False;
+ lk->acquired_at = NULL;
}
tl_assert( !lk->heldBy );
tl_assert( is_sane_LockN(lk) );
|