|
From: <sv...@va...> - 2009-07-31 08:45:18
|
Author: bart
Date: 2009-07-31 09:45:02 +0100 (Fri, 31 Jul 2009)
New Revision: 10675
Log:
Only consider two error contexts as equivalent if the contexts have another
type than "data race error" or if both data race error contexts refer to the
same access type and the same access size.
Modified:
trunk/drd/drd_error.c
Modified: trunk/drd/drd_error.c
===================================================================
--- trunk/drd/drd_error.c 2009-07-31 08:26:17 UTC (rev 10674)
+++ trunk/drd/drd_error.c 2009-07-31 08:45:02 UTC (rev 10675)
@@ -196,11 +196,20 @@
*/
static Bool drd_compare_error_contexts(VgRes res, Error* e1, Error* e2)
{
- /*
- * Since e1 and e2 have the same error kind and the same error contexts,
- * no further comparisons have to be performed. Just return true.
- */
- return True;
+ tl_assert(VG_(get_error_kind)(e1) == VG_(get_error_kind)(e2));
+
+ switch (VG_(get_error_kind)(e1))
+ {
+ case DataRaceErr:
+ {
+ const DataRaceErrInfo* const dri1 = VG_(get_error_extra)(e1);
+ const DataRaceErrInfo* const dri2 = VG_(get_error_extra)(e2);
+ return dri1->access_type == dri2->access_type
+ && dri1->size == dri2->size;
+ }
+ default:
+ return True;
+ }
}
/**
|