aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>2014-09-01 15:29:55 +0000
committermjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>2014-09-01 15:29:55 +0000
commit4fa71081858358c26ad182b82d2ddc305b2e72f1 (patch)
treebba4ccf90d438e10b3252669d73d3f411128b809
parent65f1f2de6427ff357cc780d8c7e0b0e819a95def (diff)
downloadvalgrind-4fa71081858358c26ad182b82d2ddc305b2e72f1.tar.gz
Bug 338703 helgrind on arm-linux gets false positives in dynamic loader.
There are a couple of issues with helgrind on arm-linux with glibc: - Thread creation stack traces cannot unwind through clone (cfi ends right after syscall) - ld.so has a special "hard float" name that isn't recognized as special (ld-linux-armhf.so.3) - Races are found when manipulating GOT sections. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14407 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r--NEWS1
-rw-r--r--helgrind/hg_errors.c2
-rw-r--r--helgrind/hg_main.c3
-rw-r--r--include/pub_tool_redir.h1
4 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b68e71bca..84df31f86 100644
--- a/NEWS
+++ b/NEWS
@@ -247,6 +247,7 @@ where XXXXXX is the bug number as listed below.
338499 --sim-hints parsing broken due to wrong order in tokens
338615 suppress glibc 2.20 optimized strcmp implementation for ARMv7
338681 Unable to unwind through clone thread created on i386-linux
+338703 helgrind on arm-linux gets false positives in dynamic loader
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
n-i-bz s390x: Fix memory corruption for multithreaded applications
n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases
diff --git a/helgrind/hg_errors.c b/helgrind/hg_errors.c
index 321b2b7f3..85c973cfc 100644
--- a/helgrind/hg_errors.c
+++ b/helgrind/hg_errors.c
@@ -475,6 +475,8 @@ void HG_(record_error_Race) ( Thread* thr,
if (sect == Vg_SectGOTPLT) return;
/* SectPLT is required on ppc32/64-linux */
if (sect == Vg_SectPLT) return;
+ /* SectGOT is required on arm-linux */
+ if (sect == Vg_SectGOT) return;
}
# endif
diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c
index d2261e217..46f64e390 100644
--- a/helgrind/hg_main.c
+++ b/helgrind/hg_main.c
@@ -1579,7 +1579,7 @@ void evh__pre_thread_ll_create ( ThreadId parent, ThreadId child )
{ Word first_ip_delta = 0;
# if defined(VGP_amd64_linux) || defined(VGP_x86_linux)
first_ip_delta = -3;
-# elif defined(VGP_arm64_linux)
+# elif defined(VGP_arm64_linux) || defined(VGP_arm_linux)
first_ip_delta = -1;
# endif
thr_c->created_at = VG_(record_ExeContext)(parent, first_ip_delta);
@@ -4480,6 +4480,7 @@ static Bool is_in_dynamic_linker_shared_object( Addr64 ga )
if (VG_STREQ(soname, VG_U_LD64_SO_2)) return True;
if (VG_STREQ(soname, VG_U_LD_SO_1)) return True;
if (VG_STREQ(soname, VG_U_LD_LINUX_AARCH64_SO_1)) return True;
+ if (VG_STREQ(soname, VG_U_LD_LINUX_ARMHF_SO_3)) return True;
# elif defined(VGO_darwin)
if (VG_STREQ(soname, VG_U_DYLD)) return True;
# else
diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
index b99ef2c58..f99ffb77e 100644
--- a/include/pub_tool_redir.h
+++ b/include/pub_tool_redir.h
@@ -302,6 +302,7 @@
#define VG_U_LD_SO_1 "ld.so.1"
#define VG_U_LD_LINUX_AARCH64_SO_1 "ld-linux-aarch64.so.1"
+#define VG_U_LD_LINUX_ARMHF_SO_3 "ld-linux-armhf.so.3"
#endif