|
From: <sv...@va...> - 2008-05-20 11:11:53
|
Author: bart
Date: 2008-05-20 12:11:37 +0100 (Tue, 20 May 2008)
New Revision: 8109
Log:
Suppressed data race reports on ELF .plt sections.
Modified:
branches/CROSS_COMPILATION/exp-drd/drd_main.c
Modified: branches/CROSS_COMPILATION/exp-drd/drd_main.c
===================================================================
--- branches/CROSS_COMPILATION/exp-drd/drd_main.c 2008-05-20 10:16:34 UTC (rev 8108)
+++ branches/CROSS_COMPILATION/exp-drd/drd_main.c 2008-05-20 11:11:37 UTC (rev 8109)
@@ -554,6 +554,34 @@
drd_stop_using_mem(a1, len, False);
}
+/** Suppress data race reports on all addresses contained in .plt sections
+ * inside the address range [ a, a + len [.
+ */
+static void suppress_plt(const Addr a, const SizeT len)
+{
+ const DebugInfo* di;
+
+#if 0
+ VG_(printf)("Evaluating range @ 0x%lx size %ld\n", a, len);
+#endif
+
+ for (di = VG_(next_seginfo)(0); di; di = VG_(next_seginfo)(di))
+ {
+ Addr avma;
+ SizeT size;
+
+ avma = VG_(seginfo_get_plt_avma)(di);
+ size = VG_(seginfo_get_plt_size)(di);
+ if (a <= avma && avma + size <= a + len)
+ {
+#if 0
+ VG_(printf)("Suppressing plt @ 0x%lx size %ld\n", avma, size);
+#endif
+ drd_start_suppression(avma, avma + size, ".plt");
+ }
+ }
+}
+
static
void drd_start_using_mem_w_perms(const Addr a, const SizeT len,
const Bool rr, const Bool ww, const Bool xx)
@@ -561,6 +589,8 @@
thread_set_vg_running_tid(VG_(get_running_tid)());
drd_start_using_mem(a, len);
+
+ suppress_plt(a, len);
}
/* Called by the core when the stack of a thread grows, to indicate that */
|