blob: 89a95b82fe472fde10dfe93ee24d9e5ec02d16aa [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001Fix runtime Valgrind failure
2
3This patch is derived from
4https://bugzilla.redhat.com/show_bug.cgi?id=1464211
5
6At runtime it will fails like this:
7
8ARM64 front end: branch_etc
9disInstr(arm64): unhandled instruction 0xD5380001
10disInstr(arm64): 1101'0101 0011'1000 0000'0000 0000'0001 ==2082==
11valgrind: Unrecognised instruction at address 0x4014e64.
12
13This patch is a workaround by masking all HWCAP
14
15Upstream-Status: Pending
16
17Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
18
19Index: valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c
20===================================================================
21
22--- valgrind-3.13.0.orig/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:22:17.698572675 -0800
23+++ valgrind-3.13.0/coregrind/m_initimg/initimg-linux.c 2018-03-04 22:23:25.727815624 -0800
24@@ -703,6 +703,12 @@
25 (and anything above) are not supported by Valgrind. */
26 auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
27 }
28+# elif defined(VGP_arm64_linux)
29+ {
30+ /* Linux 4.11 started populating this for arm64, but we
31+ currently don't support any. */
32+ auxv->u.a_val = 0;
33+ }
34 # endif
35 break;
36 # if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)