Author: sewardj
Date: 2008-03-04 01:53:35 +0000 (Tue, 04 Mar 2008)
New Revision: 7554

Log:
Ignore race errors in PLT sections (Konstantin Serebryany)



Modified:
   branches/HGDEV/helgrind/hg_main.c


Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c   2008-03-04 00:41:29 UTC (rev 7553)
+++ branches/HGDEV/helgrind/hg_main.c   2008-03-04 01:53:35 UTC (rev 7554)
@@ -7685,6 +7685,21 @@
    tl_assert(isWrite == False || isWrite == True);
    tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1);
 
+   /* If the PC is in something that looks like a PLT section, ignore
+      any reported races.  It appears that ld.so does intentionally
+      racey things in PLTs and it's simplest just to ignore it. */
+   if (1) {
+      ThreadId tid = map_threads_maybe_reverse_lookup_SLOW(thr);
+      if (tid != VG_INVALID_THREADID) {
+         Addr ip_at_error = VG_(get_IP)( tid );
+         if (VG_(seginfo_sect_kind)(NULL, 0, ip_at_error) == Vg_SectPLT) {
+            /* ignore this race. */
+            return;
+         }
+      }
+   }
+
+   /* Ok, so we're really going to collect this race. */
    tl_assert(sizeof(xe.XE.Race.descr1) == sizeof(xe.XE.Race.descr2));
    xe.XE.Race.descr1[0] = xe.XE.Race.descr2[0] = 0;
    if (VG_(get_data_description)(


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to