From 75b39a4ed4beff8a215d8ebdd1283beeddeb8ea5 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sat, 31 Jan 2009 15:02:07 +0000 Subject: [PATCH] Merge from the trunk, some Drd-related changes: 9087 Suppress any error whose top frame is in libc.so. While not very elegant, this is an effective way to suppress data race reports triggered by glibc's stdio functions (which uses inlined locking functions). 9090 Do not only recognize .plt and .plt.got sections inside the mapped address range, but also outside the mapped address range (necessary for ppc). 9091 Generalized suppression patterns. 9092 Removed mandatory redirections for DRD since these made DRD impossible to use on openSUSE 10.3 ppc. git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_4_BRANCH@9093 --- coregrind/m_redir.c | 19 ------------------- drd/drd_main.c | 6 ++++-- glibc-2.X-drd.supp | 6 +++++- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index 24f0488418..fbf6e7271b 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -906,15 +906,6 @@ void VG_(redir_initialise) ( void ) NULL /* not mandatory - so why bother at all? */ /* glibc-2.6.1 (openSUSE 10.3, ppc32) seems fine without it */ ); - } else if (0 == VG_(strcmp)("drd", VG_(details).name)) { - /* Only continue if symbol information in ld.so.1 is present, */ - /* because otherwise drd's suppression patterns on ld.so do */ - /* not have any effect. */ - add_hardwired_spec( - "ld.so.1", "strlen", - (Addr)(&VG_(ppc32_linux_REDIR_FOR_strlen)), - croakage - ); } } @@ -940,16 +931,6 @@ void VG_(redir_initialise) ( void ) NULL /* not mandatory - so why bother at all? */ /* glibc-2.5 (FC6, ppc64) seems fine without it */ ); - - } else if (0 == VG_(strcmp)("drd", VG_(details).name)) { - /* Only continue if symbol information in ld64.so.1 is present, */ - /* because otherwise drd's suppression patterns on ld.so do */ - /* not have any effect. */ - add_hardwired_spec( - "ld64.so.1", "strlen", - (Addr)VG_(fnptr_to_fnentry)( &VG_(ppc64_linux_REDIR_FOR_strlen) ), - croakage - ); } } diff --git a/drd/drd_main.c b/drd/drd_main.c index eb082a2711..4b8cdc22c6 100644 --- a/drd/drd_main.c +++ b/drd/drd_main.c @@ -524,7 +524,8 @@ static void suppress_relocation_conflicts(const Addr a, const SizeT len) avma = VG_(seginfo_get_plt_avma)(di); size = VG_(seginfo_get_plt_size)(di); - if (size > 0 && a <= avma && avma + size <= a + len) + tl_assert((avma && size) || (avma == 0 && size == 0)); + if (size > 0) { #if 0 VG_(printf)("Suppressing .plt @ 0x%lx size %ld\n", avma, size); @@ -535,7 +536,8 @@ static void suppress_relocation_conflicts(const Addr a, const SizeT len) avma = VG_(seginfo_get_gotplt_avma)(di); size = VG_(seginfo_get_gotplt_size)(di); - if (size > 0 && a <= avma && avma + size <= a + len) + tl_assert((avma && size) || (avma == 0 && size == 0)); + if (size > 0) { #if 0 VG_(printf)("Suppressing .got.plt @ 0x%lx size %ld\n", avma, size); diff --git a/glibc-2.X-drd.supp b/glibc-2.X-drd.supp index 34db56cdae..30437f531e 100644 --- a/glibc-2.X-drd.supp +++ b/glibc-2.X-drd.supp @@ -21,7 +21,6 @@ drd:ConflictingAccess obj:/lib*/ld-*.so obj:/lib*/ld-*.so - obj:/lib*/ld-*.so } { dl-dlsym-1 @@ -47,6 +46,11 @@ fun:_dl_addr fun:backtrace_symbols } +{ + libc-stdio + drd:ConflictingAccess + obj:/lib*/libc-* +} { libc drd:ConflictingAccess -- 2.47.2