From: Bart Van Assche Date: Fri, 31 Jul 2009 08:45:02 +0000 (+0000) Subject: Only consider two error contexts as equivalent if the contexts have another X-Git-Tag: svn/VALGRIND_3_5_0~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f4fcc00330b79a49a2b866b215c696984fad41f7;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10675 --- diff --git a/drd/drd_error.c b/drd/drd_error.c index 899a5fb818..b7a5dd7682 100644 --- a/drd/drd_error.c +++ b/drd/drd_error.c @@ -196,11 +196,20 @@ void drd_report_data_race(Error* const err, const DataRaceErrInfo* const dri) */ 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; + } } /**