3.10.1-21.svn20150817r15561
Update to current valgrind svn. Drop patches now upstream.
This commit is contained in:
parent
7e9d6f86d2
commit
48db9bd76c
@ -1,23 +0,0 @@
|
|||||||
commit b389b1806babbbf54cf92fe4c34c855a070a3cf4
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Wed Apr 22 15:29:03 2015 +0000
|
|
||||||
|
|
||||||
Enable rt_sigpending syscall on ppc64 linux.
|
|
||||||
|
|
||||||
Patch from Thomas Huth <thuth@redhat.com>
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15133 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index ba4116d..6f3c1f7 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -988,7 +988,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173
|
|
||||||
LINXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 174
|
|
||||||
|
|
||||||
-// _____(__NR_rt_sigpending, sys_rt_sigpending), // 175
|
|
||||||
+ LINXY(__NR_rt_sigpending, sys_rt_sigpending), // 175
|
|
||||||
LINXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 176
|
|
||||||
LINXY(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo), // 177
|
|
||||||
LINX_(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 178
|
|
@ -1,25 +0,0 @@
|
|||||||
commit d1d90974d5239151892742b11dd26cf12055aade
|
|
||||||
Author: cborntra <cborntra@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
|
|
||||||
Date: Thu Feb 5 11:05:10 2015 +0000
|
|
||||||
|
|
||||||
Fix bug 343802. We need to handle one more special case in the spechelper
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/vex/trunk@3083 8f6e269a-dfd6-0310-a8e1-e2731360e62c
|
|
||||||
|
|
||||||
diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c
|
|
||||||
index 78ca2ef..df1f24b 100644
|
|
||||||
--- a/VEX/priv/guest_s390_helpers.c
|
|
||||||
+++ b/VEX/priv/guest_s390_helpers.c
|
|
||||||
@@ -1958,7 +1958,10 @@ guest_s390x_spechelper(const HChar *function_name, IRExpr **args,
|
|
||||||
return unop(Iop_1Uto32, binop(Iop_CmpNE64, cc_dep1, mkU64(0)));
|
|
||||||
}
|
|
||||||
if (cond == 4 || cond == 4 + 1) {
|
|
||||||
- return unop(Iop_1Uto32, binop(Iop_CmpLT64S, cc_dep1, mkU64(0)));
|
|
||||||
+ /* Special case cc_dep < 0. Only check the MSB to avoid bogus
|
|
||||||
+ memcheck complaints due to gcc magic. Fixes 343802
|
|
||||||
+ */
|
|
||||||
+ return unop(Iop_64to32, binop(Iop_Shr64, cc_dep1, mkU8(63)));
|
|
||||||
}
|
|
||||||
if (cond == 8 + 4 || cond == 8 + 4 + 1) {
|
|
||||||
return unop(Iop_1Uto32, binop(Iop_CmpLE64S, cc_dep1, mkU64(0)));
|
|
@ -1,214 +0,0 @@
|
|||||||
commit 143af81290bd49c76c46267d64baea896df50c40
|
|
||||||
Author: sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Mon Nov 24 16:19:48 2014 +0000
|
|
||||||
|
|
||||||
Enable sys_flock on arm64-linux.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14777 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index cd27ad2..d90dcb6 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -880,6 +880,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINX_(__NR_inotify_add_watch, sys_inotify_add_watch), // 27
|
|
||||||
LINX_(__NR_inotify_rm_watch, sys_inotify_rm_watch), // 28
|
|
||||||
LINXY(__NR_ioctl, sys_ioctl), // 29
|
|
||||||
+ GENX_(__NR_flock, sys_flock), // 32
|
|
||||||
LINX_(__NR_mknodat, sys_mknodat), // 33
|
|
||||||
LINX_(__NR_mkdirat, sys_mkdirat), // 34
|
|
||||||
LINX_(__NR_unlinkat, sys_unlinkat), // 35
|
|
||||||
@@ -1183,7 +1184,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ LINXY(__NR__llseek, sys_llseek), // 140
|
|
||||||
//ZZ GENXY(__NR_getdents, sys_getdents), // 141
|
|
||||||
//ZZ GENX_(__NR__newselect, sys_select), // 142
|
|
||||||
-//ZZ GENX_(__NR_flock, sys_flock), // 143
|
|
||||||
//ZZ
|
|
||||||
//ZZ LINXY(__NR__sysctl, sys_sysctl), // 149
|
|
||||||
//ZZ
|
|
||||||
commit 9ae3282faa77f89c43fdd97186875ff8da90fff9
|
|
||||||
Author: sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Thu Feb 5 15:28:28 2015 +0000
|
|
||||||
|
|
||||||
Enable sys_mbind, sys_get_mempolicy, sys_set_mempolicy on arm64-linux.
|
|
||||||
Patch from Hideaki Kimura (hideaki.kimura@gmail.com). Fixes #342038.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14907 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index a72392f..16df466 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1032,6 +1032,9 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
GENX_(__NR_mlock, sys_mlock), // 228
|
|
||||||
GENX_(__NR_mlockall, sys_mlockall), // 230
|
|
||||||
GENX_(__NR_madvise, sys_madvise), // 233
|
|
||||||
+ LINX_(__NR_mbind, sys_mbind), // 235
|
|
||||||
+ LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 236
|
|
||||||
+ LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 237
|
|
||||||
GENXY(__NR_wait4, sys_wait4), // 260
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270
|
|
||||||
commit 9ee89cddf19b6ab8f45e8546ef73d3e4e997ad2f
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Sat Feb 7 22:36:48 2015 +0000
|
|
||||||
|
|
||||||
Bug 343732 - Unhandled syscall 144 (setgid) on aarch64.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14916 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index 16df466..ed66227 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -959,6 +959,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
GENX_(__NR_setpriority, sys_setpriority), // 140
|
|
||||||
GENX_(__NR_getpriority, sys_getpriority), // 141
|
|
||||||
GENX_(__NR_setregid, sys_setregid), // 143
|
|
||||||
+ GENX_(__NR_setgid, sys_setgid), // 144
|
|
||||||
GENX_(__NR_setreuid, sys_setreuid), // 145
|
|
||||||
LINX_(__NR_setresuid, sys_setresuid), // 147
|
|
||||||
LINXY(__NR_getresuid, sys_getresuid), // 148
|
|
||||||
@@ -1091,7 +1092,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ LINXY(__NR_pipe, sys_pipe), // 42
|
|
||||||
//ZZ // GENX_(__NR_prof, sys_ni_syscall), // 44
|
|
||||||
|
|
||||||
-//ZZ LINX_(__NR_setgid, sys_setgid16), // 46
|
|
||||||
//ZZ LINX_(__NR_getgid, sys_getgid16), // 47
|
|
||||||
//ZZ //zz // (__NR_signal, sys_signal), // 48 */* (ANSI C)
|
|
||||||
//ZZ LINX_(__NR_geteuid, sys_geteuid16), // 49
|
|
||||||
commit ae70db15b2f8e013bd8a3874d3d6716eb5b8e48c
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Sat Feb 7 22:58:51 2015 +0000
|
|
||||||
|
|
||||||
Bug 343733 Unhandled syscall 187 (msgctl and related) on aarch64
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14917 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index ed66227..c23e6f7 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -992,6 +992,10 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_mq_timedreceive, sys_mq_timedreceive), // 183
|
|
||||||
LINX_(__NR_mq_notify, sys_mq_notify), // 184
|
|
||||||
LINXY(__NR_mq_getsetattr, sys_mq_getsetattr), // 185
|
|
||||||
+ LINX_(__NR_msgget, sys_msgget), // 186
|
|
||||||
+ LINXY(__NR_msgctl, sys_msgctl), // 187
|
|
||||||
+ LINXY(__NR_msgrcv, sys_msgrcv), // 188
|
|
||||||
+ LINX_(__NR_msgsnd, sys_msgsnd), // 189
|
|
||||||
LINX_(__NR_semget, sys_semget), // 190
|
|
||||||
LINXY(__NR_semctl, sys_semctl), // 191
|
|
||||||
LINX_(__NR_semtimedop, sys_semtimedop), // 192
|
|
||||||
@@ -1323,10 +1327,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ LINXY(__NR_recvfrom, sys_recvfrom), // 292
|
|
||||||
//ZZ LINX_(__NR_semget, sys_semget), // 299
|
|
||||||
//ZZ LINXY(__NR_semctl, sys_semctl), // 300
|
|
||||||
-//ZZ LINX_(__NR_msgget, sys_msgget),
|
|
||||||
-//ZZ LINX_(__NR_msgsnd, sys_msgsnd),
|
|
||||||
-//ZZ LINXY(__NR_msgrcv, sys_msgrcv),
|
|
||||||
-//ZZ LINXY(__NR_msgctl, sys_msgctl), // 304
|
|
||||||
//ZZ
|
|
||||||
//ZZ LINX_(__NR_request_key, sys_request_key), // 287
|
|
||||||
//ZZ // LINX_(__NR_ioprio_set, sys_ioprio_set), // 289
|
|
||||||
commit c79fe53e9e31d5c8e5d2ad3a0943b21e84129ccb
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Feb 10 13:39:04 2015 +0000
|
|
||||||
|
|
||||||
Bug #344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344)
|
|
||||||
|
|
||||||
ppc64 might fall back to socketcall in some cases, but arm64 always uses
|
|
||||||
accept4 syscall directly. Some (confusing) background on when/how glibc
|
|
||||||
(wrongly) decides to use a direct accept4 or the socketcall system call:
|
|
||||||
https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14926 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index c23e6f7..1f9670a 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1040,6 +1040,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINX_(__NR_mbind, sys_mbind), // 235
|
|
||||||
LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 236
|
|
||||||
LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 237
|
|
||||||
+ LINXY(__NR_accept4, sys_accept4), // 242
|
|
||||||
GENXY(__NR_wait4, sys_wait4), // 260
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270
|
|
||||||
@@ -1379,8 +1380,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 363
|
|
||||||
//ZZ LINXY(__NR_perf_event_open, sys_perf_event_open), // 364
|
|
||||||
//ZZ
|
|
||||||
-//ZZ LINXY(__NR_accept4, sys_accept4), // 366
|
|
||||||
-//ZZ
|
|
||||||
//ZZ LINXY(__NR_name_to_handle_at, sys_name_to_handle_at),// 370
|
|
||||||
//ZZ LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 371
|
|
||||||
//ZZ LINXY(__NR_clock_adjtime, sys_clock_adjtime) // 372
|
|
||||||
commit 52e770f94992d381dc1dbe104770ebc8cb9937c4
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Wed Feb 18 14:23:17 2015 +0000
|
|
||||||
|
|
||||||
Bug #344307 2 unhandled syscalls on aarch64/arm64: umount2(39), mount (40)
|
|
||||||
|
|
||||||
Reporter: Branislav Blaskovic, bblaskov@redhat.com
|
|
||||||
Patch: Robin Hack, rhack@redhat.com
|
|
||||||
Test: Miloš Prchlík, mprchlik@redhat.com
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14944 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index 7b7e824..fc6ca08 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -887,6 +887,9 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINX_(__NR_linkat, sys_linkat), // 37
|
|
||||||
LINX_(__NR_renameat, sys_renameat), // 38
|
|
||||||
|
|
||||||
+ LINX_(__NR_umount2, sys_umount), // 39
|
|
||||||
+ LINX_(__NR_mount, sys_mount), // 40
|
|
||||||
+
|
|
||||||
// FIXME IS THIS CORRECT? it may well not be.
|
|
||||||
GENXY(__NR3264_statfs, sys_statfs), // 43
|
|
||||||
GENXY(__NR3264_fstatfs, sys_fstatfs), // 44
|
|
||||||
@@ -1075,7 +1078,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ LINX_(__NR_lseek, sys_lseek), // 19
|
|
||||||
//ZZ
|
|
||||||
//ZZ GENX_(__NR_getpid, sys_getpid), // 20
|
|
||||||
-//ZZ LINX_(__NR_mount, sys_mount), // 21
|
|
||||||
//ZZ LINX_(__NR_umount, sys_oldumount), // 22
|
|
||||||
//ZZ LINX_(__NR_setuid, sys_setuid16), // 23 ## P
|
|
||||||
//ZZ LINX_(__NR_getuid, sys_getuid16), // 24 ## P
|
|
||||||
@@ -1107,7 +1109,6 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
//ZZ
|
|
||||||
//ZZ LINX_(__NR_getegid, sys_getegid16), // 50
|
|
||||||
//ZZ GENX_(__NR_acct, sys_acct), // 51
|
|
||||||
-//ZZ LINX_(__NR_umount2, sys_umount), // 52
|
|
||||||
//ZZ // GENX_(__NR_lock, sys_ni_syscall), // 53
|
|
||||||
//ZZ
|
|
||||||
//ZZ LINXY(__NR_fcntl, sys_fcntl), // 55
|
|
||||||
commit 53d91c0f31aba5d1c9a896b4fdb0ef5f7eca47cf
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Sun Aug 9 22:37:52 2015 +0000
|
|
||||||
|
|
||||||
Bug #351140 arm64 syscalls setuid (146) and setresgid (149) not implemented.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15517 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index ee224ca..10872fa 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -957,8 +957,10 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
GENX_(__NR_setregid, sys_setregid), // 143
|
|
||||||
GENX_(__NR_setgid, sys_setgid), // 144
|
|
||||||
GENX_(__NR_setreuid, sys_setreuid), // 145
|
|
||||||
+ GENX_(__NR_setuid, sys_setuid), // 146
|
|
||||||
LINX_(__NR_setresuid, sys_setresuid), // 147
|
|
||||||
LINXY(__NR_getresuid, sys_getresuid), // 148
|
|
||||||
+ LINX_(__NR_setresgid, sys_setresgid), // 149
|
|
||||||
LINXY(__NR_getresgid, sys_getresgid), // 150
|
|
||||||
GENXY(__NR_times, sys_times), // 153
|
|
||||||
GENX_(__NR_setpgid, sys_setpgid), // 154
|
|
@ -1,25 +0,0 @@
|
|||||||
commit ca799bc50411fe5a0cf79e60e97a2c3a0a2afdda
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Jun 2 18:17:44 2015 +0000
|
|
||||||
|
|
||||||
Enable process_vm_readv/writev syscall on arm32.
|
|
||||||
|
|
||||||
This makes none/tests/process_vm_readv_writev.vgtest pass on arm32.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15304 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
index f8f56f5..32c41ca 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
@@ -1214,6 +1214,10 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 372
|
|
||||||
LINX_(__NR_syncfs, sys_syncfs), // 373
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 374
|
|
||||||
+
|
|
||||||
+ LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 376
|
|
||||||
+ LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 377
|
|
||||||
+
|
|
||||||
LINXY(__NR_getrandom, sys_getrandom), // 384
|
|
||||||
LINXY(__NR_memfd_create, sys_memfd_create) // 385
|
|
||||||
};
|
|
@ -1,102 +0,0 @@
|
|||||||
commit 41d3053e27e5be8f5d3f7e6f2880e046b43387be
|
|
||||||
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Thu Jun 4 19:44:47 2015 +0000
|
|
||||||
|
|
||||||
On platforms that have an accessible redzone below the SP, the unwind logic
|
|
||||||
should be able to access the redzone.
|
|
||||||
So, when computing fp_min, substract the redzone.
|
|
||||||
Currently, only amd64 and ppc64 have a non 0 redzone.
|
|
||||||
|
|
||||||
Regtested on amd64 and ppc64le, no regression.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15309 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
--- valgrind-3.10.1/coregrind/m_stacktrace.c.orig 2014-11-25 20:41:21.000000000 +0100
|
|
||||||
+++ valgrind-3.10.1/coregrind/m_stacktrace.c 2015-06-07 16:20:31.962739322 +0200
|
|
||||||
@@ -76,7 +76,20 @@
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
+/* Note about calculation of fp_min : fp_min is the lowest address
|
|
||||||
+ which can be accessed during unwinding. This is SP - VG_STACK_REDZONE_SZB.
|
|
||||||
+ On most platforms, this will be equal to SP (as VG_STACK_REDZONE_SZB
|
|
||||||
+ is 0). However, on some platforms (e.g. amd64), there is an accessible
|
|
||||||
+ redzone below the SP. Some CFI unwind info are generated, taking this
|
|
||||||
+ into account. As an example, the following is a CFI unwind info on
|
|
||||||
+ amd64 found for a 'retq' instruction:
|
|
||||||
+[0x400f7e .. 0x400f7e]: let cfa=oldSP+8 in RA=*(cfa+-8) SP=cfa+0 BP=*(cfa+-16)
|
|
||||||
+ 0x400f7e: retq
|
|
||||||
+ As you can see, the previous BP is found 16 bytes below the cfa, which
|
|
||||||
+ is the oldSP+8. So, effectively, the BP is found 8 bytes below the SP.
|
|
||||||
+ The fp_min must take this into account, otherwise, VG_(use_CF_info) will
|
|
||||||
+ not unwind the BP. */
|
|
||||||
+
|
|
||||||
/* ------------------------ x86 ------------------------- */
|
|
||||||
|
|
||||||
#if defined(VGP_x86_linux) || defined(VGP_x86_darwin)
|
|
||||||
@@ -192,7 +205,7 @@
|
|
||||||
uregs.xip = (Addr)startRegs->r_pc;
|
|
||||||
uregs.xsp = (Addr)startRegs->r_sp;
|
|
||||||
uregs.xbp = startRegs->misc.X86.r_ebp;
|
|
||||||
- Addr fp_min = uregs.xsp;
|
|
||||||
+ Addr fp_min = uregs.xsp - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
/* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
|
|
||||||
stopping when the trail goes cold, which we guess to be
|
|
||||||
@@ -473,7 +486,7 @@
|
|
||||||
uregs.xip = startRegs->r_pc;
|
|
||||||
uregs.xsp = startRegs->r_sp;
|
|
||||||
uregs.xbp = startRegs->misc.AMD64.r_rbp;
|
|
||||||
- Addr fp_min = uregs.xsp;
|
|
||||||
+ Addr fp_min = uregs.xsp - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
/* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
|
|
||||||
stopping when the trail goes cold, which we guess to be
|
|
||||||
@@ -654,7 +667,7 @@
|
|
||||||
# elif defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
|
||||||
Addr lr = startRegs->misc.PPC64.r_lr;
|
|
||||||
# endif
|
|
||||||
- Addr fp_min = sp;
|
|
||||||
+ Addr fp_min = sp - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
/* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
|
|
||||||
stopping when the trail goes cold, which we guess to be
|
|
||||||
@@ -917,7 +930,7 @@
|
|
||||||
uregs.r12 = startRegs->misc.ARM.r12;
|
|
||||||
uregs.r11 = startRegs->misc.ARM.r11;
|
|
||||||
uregs.r7 = startRegs->misc.ARM.r7;
|
|
||||||
- Addr fp_min = uregs.r13;
|
|
||||||
+ Addr fp_min = uregs.r13 - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
/* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
|
|
||||||
stopping when the trail goes cold, which we guess to be
|
|
||||||
@@ -1061,7 +1074,7 @@
|
|
||||||
uregs.sp = startRegs->r_sp;
|
|
||||||
uregs.x30 = startRegs->misc.ARM64.x30;
|
|
||||||
uregs.x29 = startRegs->misc.ARM64.x29;
|
|
||||||
- Addr fp_min = uregs.sp;
|
|
||||||
+ Addr fp_min = uregs.sp - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
/* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1],
|
|
||||||
stopping when the trail goes cold, which we guess to be
|
|
||||||
@@ -1155,7 +1168,7 @@
|
|
||||||
D3UnwindRegs uregs;
|
|
||||||
uregs.ia = startRegs->r_pc;
|
|
||||||
uregs.sp = startRegs->r_sp;
|
|
||||||
- Addr fp_min = uregs.sp;
|
|
||||||
+ Addr fp_min = uregs.sp - VG_STACK_REDZONE_SZB;
|
|
||||||
uregs.fp = startRegs->misc.S390X.r_fp;
|
|
||||||
uregs.lr = startRegs->misc.S390X.r_lr;
|
|
||||||
|
|
||||||
@@ -1238,7 +1251,7 @@
|
|
||||||
D3UnwindRegs uregs;
|
|
||||||
uregs.pc = startRegs->r_pc;
|
|
||||||
uregs.sp = startRegs->r_sp;
|
|
||||||
- Addr fp_min = uregs.sp;
|
|
||||||
+ Addr fp_min = uregs.sp - VG_STACK_REDZONE_SZB;
|
|
||||||
|
|
||||||
#if defined(VGP_mips32_linux)
|
|
||||||
uregs.fp = startRegs->misc.MIPS32.r30;
|
|
@ -1,75 +0,0 @@
|
|||||||
commit 3d62ad9a0158a1fe56cf3cff9fc49bfb6d504b27
|
|
||||||
Author: florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Mon Nov 24 22:30:49 2014 +0000
|
|
||||||
|
|
||||||
Change the testcase to not depend on the type of 'this' in the output.
|
|
||||||
GCC 4.9.2 and GCC 4.8.x have different opinions about that variable's type.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14780 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/memcheck/tests/demangle.cpp b/memcheck/tests/demangle.cpp
|
|
||||||
index 6fb2b98..ff15fe1 100644
|
|
||||||
--- a/memcheck/tests/demangle.cpp
|
|
||||||
+++ b/memcheck/tests/demangle.cpp
|
|
||||||
@@ -16,7 +16,7 @@ class magic {
|
|
||||||
public:
|
|
||||||
T xyzzy(T *p)
|
|
||||||
{
|
|
||||||
- return (new abc::def<int,typeof(this)>)->xyzzy(p, 0);
|
|
||||||
+ return (new abc::def<int,typeof(*this)>)->xyzzy(p, 0);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/memcheck/tests/demangle.stderr.exp b/memcheck/tests/demangle.stderr.exp
|
|
||||||
index b79c638..2124517 100644
|
|
||||||
--- a/memcheck/tests/demangle.stderr.exp
|
|
||||||
+++ b/memcheck/tests/demangle.stderr.exp
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
|
|
||||||
Conditional jump or move depends on uninitialised value(s)
|
|
||||||
- at 0x........: abc::def<int, magic<int>* const>::xyzzy(int*, magic<int>* const*) (demangle.cpp:9)
|
|
||||||
+ at 0x........: abc::def<int, magic<int> >::xyzzy(int*, magic<int>*) (demangle.cpp:9)
|
|
||||||
by 0x........: magic<int>::xyzzy(int*) (demangle.cpp:19)
|
|
||||||
by 0x........: main (demangle.cpp:27)
|
|
||||||
|
|
||||||
commit 79a59b53abd68d3d5df2f77bfbe23d6c3eab0e4b
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Wed Jun 3 09:52:00 2015 +0000
|
|
||||||
|
|
||||||
Run memcheck/tests/demangle with -q.
|
|
||||||
|
|
||||||
The interesting part is the demangled backtrace in the error message.
|
|
||||||
Suppress the memory allocation/blocks summary which can differ slightly
|
|
||||||
depending on the underlying arch/libs.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15308 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/memcheck/tests/demangle.stderr.exp b/memcheck/tests/demangle.stderr.exp
|
|
||||||
index 2124517..6e7467d 100644
|
|
||||||
--- a/memcheck/tests/demangle.stderr.exp
|
|
||||||
+++ b/memcheck/tests/demangle.stderr.exp
|
|
||||||
@@ -1,16 +1,5 @@
|
|
||||||
-
|
|
||||||
Conditional jump or move depends on uninitialised value(s)
|
|
||||||
at 0x........: abc::def<int, magic<int> >::xyzzy(int*, magic<int>*) (demangle.cpp:9)
|
|
||||||
by 0x........: magic<int>::xyzzy(int*) (demangle.cpp:19)
|
|
||||||
by 0x........: main (demangle.cpp:27)
|
|
||||||
|
|
||||||
-
|
|
||||||
-HEAP SUMMARY:
|
|
||||||
- in use at exit: 6 bytes in 3 blocks
|
|
||||||
- total heap usage: 3 allocs, 0 frees, 6 bytes allocated
|
|
||||||
-
|
|
||||||
-For a detailed leak analysis, rerun with: --leak-check=full
|
|
||||||
-
|
|
||||||
-For counts of detected and suppressed errors, rerun with: -v
|
|
||||||
-Use --track-origins=yes to see where uninitialised values come from
|
|
||||||
-ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
|
|
||||||
diff --git a/memcheck/tests/demangle.vgtest b/memcheck/tests/demangle.vgtest
|
|
||||||
index f6ae038..b65b6d3 100644
|
|
||||||
--- a/memcheck/tests/demangle.vgtest
|
|
||||||
+++ b/memcheck/tests/demangle.vgtest
|
|
||||||
@@ -1 +1,2 @@
|
|
||||||
prog: demangle
|
|
||||||
+vgopts: -q
|
|
@ -1,11 +0,0 @@
|
|||||||
--- valgrind-3.10.1/coregrind/m_debuginfo/debuginfo.c.orig 2015-07-06 00:21:14.252904153 +0200
|
|
||||||
+++ valgrind-3.10.1/coregrind/m_debuginfo/debuginfo.c 2015-07-06 00:22:30.975591973 +0200
|
|
||||||
@@ -925,7 +925,7 @@
|
|
||||||
|
|
||||||
/* Note the details about the mapping. */
|
|
||||||
struct _DebugInfoMapping map;
|
|
||||||
- map.avma = a;
|
|
||||||
+ map.avma = seg->start;
|
|
||||||
map.size = seg->end + 1 - seg->start;
|
|
||||||
map.foff = seg->offset;
|
|
||||||
map.rx = is_rx_map;
|
|
File diff suppressed because it is too large
Load Diff
@ -1,455 +0,0 @@
|
|||||||
commit 4f3062b90b12f3e031a1c949c50a79e0d13de485
|
|
||||||
Author: bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Sat Sep 13 10:53:00 2014 +0000
|
|
||||||
|
|
||||||
configure.ac: Generalize glibc version check
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14530 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index ba11ec6..863cd7e 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -875,141 +875,41 @@ AC_EGREP_CPP([BIONIC_LIBC], [
|
|
||||||
GLIBC_VERSION="bionic")
|
|
||||||
|
|
||||||
|
|
||||||
-AC_MSG_CHECKING([the GLIBC_VERSION version])
|
|
||||||
+AC_MSG_CHECKING([the glibc version])
|
|
||||||
|
|
||||||
case "${GLIBC_VERSION}" in
|
|
||||||
2.2)
|
|
||||||
- AC_MSG_RESULT(2.2 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x])
|
|
||||||
+ AC_MSG_RESULT(${GLIBC_VERSION} family)
|
|
||||||
DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
-
|
|
||||||
- 2.3)
|
|
||||||
- AC_MSG_RESULT(2.3 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.4)
|
|
||||||
- AC_MSG_RESULT(2.4 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.5)
|
|
||||||
- AC_MSG_RESULT(2.5 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.6)
|
|
||||||
- AC_MSG_RESULT(2.6 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.7)
|
|
||||||
- AC_MSG_RESULT(2.7 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.8)
|
|
||||||
- AC_MSG_RESULT(2.8 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.9)
|
|
||||||
- AC_MSG_RESULT(2.9 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.10)
|
|
||||||
- AC_MSG_RESULT(2.10 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_10], 1, [Define to 1 if you're using glibc 2.10.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.11)
|
|
||||||
- AC_MSG_RESULT(2.11 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.12)
|
|
||||||
- AC_MSG_RESULT(2.12 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.13)
|
|
||||||
- AC_MSG_RESULT(2.13 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.14)
|
|
||||||
- AC_MSG_RESULT(2.14 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
+ 2.[[3-6]])
|
|
||||||
+ AC_MSG_RESULT(${GLIBC_VERSION} family)
|
|
||||||
+ DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.15)
|
|
||||||
- AC_MSG_RESULT(2.15 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x])
|
|
||||||
+ 2.[[7-9]])
|
|
||||||
+ AC_MSG_RESULT(${GLIBC_VERSION} family)
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.16)
|
|
||||||
- AC_MSG_RESULT(2.16 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x])
|
|
||||||
+ 2.10|2.11)
|
|
||||||
+ AC_MSG_RESULT(${GLIBC_VERSION} family)
|
|
||||||
+ AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
|
|
||||||
+ [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.17)
|
|
||||||
- AC_MSG_RESULT(2.17 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.18)
|
|
||||||
- AC_MSG_RESULT(2.18 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.19)
|
|
||||||
- AC_MSG_RESULT(2.19 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.20)
|
|
||||||
- AC_MSG_RESULT(2.20 family)
|
|
||||||
- AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x])
|
|
||||||
+ 2.*)
|
|
||||||
+ AC_MSG_RESULT(${GLIBC_VERSION} family)
|
|
||||||
+ AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
|
|
||||||
+ [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
|
|
||||||
+ AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
|
|
||||||
+ [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
@@ -1024,10 +924,9 @@ case "${GLIBC_VERSION}" in
|
|
||||||
AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
|
|
||||||
DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
-
|
|
||||||
- *)
|
|
||||||
+ 2.0|2.1|*)
|
|
||||||
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
|
|
||||||
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19])
|
|
||||||
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later])
|
|
||||||
AC_MSG_ERROR([or Darwin or Bionic libc])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
|
|
||||||
index 9d3c9b1..9aee707 100644
|
|
||||||
--- a/coregrind/m_redir.c
|
|
||||||
+++ b/coregrind/m_redir.c
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
#include "pub_core_demangle.h" // VG_(maybe_Z_demangle)
|
|
||||||
#include "pub_core_libcproc.h" // VG_(libdir)
|
|
||||||
|
|
||||||
-#include "config.h" /* GLIBC_2_* */
|
|
||||||
+#include "config.h" /* GLIBC_MANDATORY_*_REDIRECT */
|
|
||||||
|
|
||||||
|
|
||||||
/* This module is a critical part of the redirection/intercept system.
|
|
||||||
@@ -1242,10 +1242,7 @@ void VG_(redir_initialise) ( void )
|
|
||||||
start, otherwise ld.so (glibc-2.3.5) makes a lot of noise. */
|
|
||||||
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
|
|
||||||
const HChar** mandatory;
|
|
||||||
-# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \
|
|
||||||
- || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \
|
|
||||||
- || defined(GLIBC_2_8) || defined(GLIBC_2_9) \
|
|
||||||
- || defined(GLIBC_2_10) || defined(GLIBC_2_11)
|
|
||||||
+# ifndef GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT
|
|
||||||
mandatory = NULL;
|
|
||||||
# else
|
|
||||||
/* for glibc-2.12 and later, this is mandatory - can't sanely
|
|
||||||
@@ -1282,9 +1279,7 @@ void VG_(redir_initialise) ( void )
|
|
||||||
add_hardwired_spec(
|
|
||||||
"ld-linux-x86-64.so.2", "strlen",
|
|
||||||
(Addr)&VG_(amd64_linux_REDIR_FOR_strlen),
|
|
||||||
-# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \
|
|
||||||
- || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \
|
|
||||||
- || defined(GLIBC_2_8) || defined(GLIBC_2_9)
|
|
||||||
+# ifndef GLIBC_MANDATORY_STRLEN_REDIRECT
|
|
||||||
NULL
|
|
||||||
# else
|
|
||||||
/* for glibc-2.10 and later, this is mandatory - can't sanely
|
|
||||||
--- valgrind-3.10.1/configure.orig 2015-02-18 16:53:12.878214576 +0100
|
|
||||||
+++ valgrind-3.10.1/configure 2015-02-18 16:54:17.347087203 +0100
|
|
||||||
@@ -6645,198 +6645,49 @@
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the GLIBC_VERSION version" >&5
|
|
||||||
-$as_echo_n "checking the GLIBC_VERSION version... " >&6; }
|
|
||||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the glibc version" >&5
|
|
||||||
+$as_echo_n "checking the glibc version... " >&6; }
|
|
||||||
|
|
||||||
case "${GLIBC_VERSION}" in
|
|
||||||
2.2)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.2 family" >&5
|
|
||||||
-$as_echo "2.2 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_2 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GLIBC_VERSION} family" >&5
|
|
||||||
+$as_echo "${GLIBC_VERSION} family" >&6; }
|
|
||||||
DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
-
|
|
||||||
- 2.3)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.3 family" >&5
|
|
||||||
-$as_echo "2.3 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_3 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.4)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4 family" >&5
|
|
||||||
-$as_echo "2.4 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_4 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.5)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.5 family" >&5
|
|
||||||
-$as_echo "2.5 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_5 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.6)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 family" >&5
|
|
||||||
-$as_echo "2.6 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_6 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.7)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.7 family" >&5
|
|
||||||
-$as_echo "2.7 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_7 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.8)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.8 family" >&5
|
|
||||||
-$as_echo "2.8 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_8 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.9)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.9 family" >&5
|
|
||||||
-$as_echo "2.9 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_9 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.10)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.10 family" >&5
|
|
||||||
-$as_echo "2.10 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_10 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.11)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.11 family" >&5
|
|
||||||
-$as_echo "2.11 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_11 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.12)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.12 family" >&5
|
|
||||||
-$as_echo "2.12 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_12 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.13)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.13 family" >&5
|
|
||||||
-$as_echo "2.13 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_13 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.14)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.14 family" >&5
|
|
||||||
-$as_echo "2.14 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_14 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.15)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.15 family" >&5
|
|
||||||
-$as_echo "2.15 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_15 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.16)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.16 family" >&5
|
|
||||||
-$as_echo "2.16 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_16 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
+ 2.[3-6])
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GLIBC_VERSION} family" >&5
|
|
||||||
+$as_echo "${GLIBC_VERSION} family" >&6; }
|
|
||||||
+ DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.17)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
|
|
||||||
-$as_echo "2.17 family" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define GLIBC_2_17 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
+ 2.[7-9])
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GLIBC_VERSION} family" >&5
|
|
||||||
+$as_echo "${GLIBC_VERSION} family" >&6; }
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.18)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.18 family" >&5
|
|
||||||
-$as_echo "2.18 family" >&6; }
|
|
||||||
+ 2.10|2.11)
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GLIBC_VERSION} family" >&5
|
|
||||||
+$as_echo "${GLIBC_VERSION} family" >&6; }
|
|
||||||
|
|
||||||
-$as_echo "#define GLIBC_2_18 1" >>confdefs.h
|
|
||||||
+$as_echo "#define GLIBC_MANDATORY_STRLEN_REDIRECT 1" >>confdefs.h
|
|
||||||
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
- 2.19)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
|
|
||||||
-$as_echo "2.19 family" >&6; }
|
|
||||||
+ 2.*)
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GLIBC_VERSION} family" >&5
|
|
||||||
+$as_echo "${GLIBC_VERSION} family" >&6; }
|
|
||||||
|
|
||||||
-$as_echo "#define GLIBC_2_19 1" >>confdefs.h
|
|
||||||
+$as_echo "#define GLIBC_MANDATORY_STRLEN_REDIRECT 1" >>confdefs.h
|
|
||||||
|
|
||||||
- DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
|
||||||
- ;;
|
|
||||||
- 2.20)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.20 family" >&5
|
|
||||||
-$as_echo "2.20 family" >&6; }
|
|
||||||
|
|
||||||
-$as_echo "#define GLIBC_2_20 1" >>confdefs.h
|
|
||||||
+$as_echo "#define GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT 1" >>confdefs.h
|
|
||||||
|
|
||||||
DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
|
||||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
|
||||||
@@ -6858,11 +6709,10 @@
|
|
||||||
|
|
||||||
DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
|
|
||||||
;;
|
|
||||||
-
|
|
||||||
- *)
|
|
||||||
+ 2.0|2.1|*)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
|
|
||||||
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
|
|
||||||
- as_fn_error $? "Valgrind requires glibc version 2.2 - 2.19" "$LINENO" 5
|
|
||||||
+ as_fn_error $? "Valgrind requires glibc version 2.2 or later" "$LINENO" 5
|
|
||||||
as_fn_error $? "or Darwin or Bionic libc" "$LINENO" 5
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,96 +0,0 @@
|
|||||||
commit bf803555d10b5b4c9223b24bf13845ee88d8f3b5
|
|
||||||
Author: cborntra <cborntra@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Mon Feb 23 20:19:03 2015 +0000
|
|
||||||
|
|
||||||
Fix configure for Linux kernel >= 4.0-rc1
|
|
||||||
In addition raise the minimal Linux version to 2.6 as there is almost
|
|
||||||
no test coverage for 2.4 and 2.6 was released in 2003.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index fe2897b..ebb0798 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -325,20 +325,14 @@ case "${host_os}" in
|
|
||||||
kernel=`uname -r`
|
|
||||||
|
|
||||||
case "${kernel}" in
|
|
||||||
- 2.6.*|3.*)
|
|
||||||
- AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
|
|
||||||
- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.4.*)
|
|
||||||
- AC_MSG_RESULT([2.4 family (${kernel})])
|
|
||||||
- AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- *)
|
|
||||||
+ 0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*)
|
|
||||||
AC_MSG_RESULT([unsupported (${kernel})])
|
|
||||||
- AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
|
|
||||||
+ AC_MSG_ERROR([Valgrind needs a Linux kernel >= 2.6])
|
|
||||||
;;
|
|
||||||
+
|
|
||||||
+ *)
|
|
||||||
+ AC_MSG_RESULT([2.6 or later (${kernel})])
|
|
||||||
+ ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
;;
|
|
||||||
diff -ur valgrind-3.10.1.orig/config.h.in valgrind-3.10.1/config.h.in
|
|
||||||
--- valgrind-3.10.1.orig/config.h.in 2015-06-19 11:36:36.495314032 +0200
|
|
||||||
+++ valgrind-3.10.1/config.h.in 2015-06-19 11:36:50.000000000 +0200
|
|
||||||
@@ -280,12 +280,6 @@
|
|
||||||
/* Define to 1 if you have the `utimensat' function. */
|
|
||||||
#undef HAVE_UTIMENSAT
|
|
||||||
|
|
||||||
-/* Define to 1 if you're using Linux 2.4.x */
|
|
||||||
-#undef KERNEL_2_4
|
|
||||||
-
|
|
||||||
-/* Define to 1 if you're using Linux 2.6.x or Linux 3.x */
|
|
||||||
-#undef KERNEL_2_6
|
|
||||||
-
|
|
||||||
/* configured default page size 4k */
|
|
||||||
#undef MIPS_PAGE_SHIFT
|
|
||||||
|
|
||||||
diff -ur valgrind-3.10.1.orig/configure valgrind-3.10.1/configure
|
|
||||||
--- valgrind-3.10.1.orig/configure 2015-06-19 11:36:36.496314042 +0200
|
|
||||||
+++ valgrind-3.10.1/configure 2015-06-19 11:36:56.837523466 +0200
|
|
||||||
@@ -5554,27 +5554,16 @@
|
|
||||||
kernel=`uname -r`
|
|
||||||
|
|
||||||
case "${kernel}" in
|
|
||||||
- 2.6.*|3.*)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6.x/3.x family (${kernel})" >&5
|
|
||||||
-$as_echo "2.6.x/3.x family (${kernel})" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define KERNEL_2_6 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- 2.4.*)
|
|
||||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4 family (${kernel})" >&5
|
|
||||||
-$as_echo "2.4 family (${kernel})" >&6; }
|
|
||||||
-
|
|
||||||
-$as_echo "#define KERNEL_2_4 1" >>confdefs.h
|
|
||||||
-
|
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- *)
|
|
||||||
+ 0.*|1.*|2.0.*|2.1.*|2.2.*|2.3.*|2.4.*|2.5.*)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported (${kernel})" >&5
|
|
||||||
$as_echo "unsupported (${kernel})" >&6; }
|
|
||||||
- as_fn_error $? "Valgrind works on kernels 2.4, 2.6" "$LINENO" 5
|
|
||||||
+ as_fn_error $? "Valgrind needs a Linux kernel >= 2.6" "$LINENO" 5
|
|
||||||
;;
|
|
||||||
+
|
|
||||||
+ *)
|
|
||||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.6 or later (${kernel})" >&5
|
|
||||||
+$as_echo "2.6 or later (${kernel})" >&6; }
|
|
||||||
+ ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
;;
|
|
@ -1,171 +0,0 @@
|
|||||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
index 22c6c98..4a8d7e1 100644
|
|
||||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
@@ -285,6 +285,7 @@ DECL_TEMPLATE(linux, sys_fanotify_mark);
|
|
||||||
|
|
||||||
// Linux-specific (new in Linux 3.17)
|
|
||||||
DECL_TEMPLATE(linux, sys_getrandom);
|
|
||||||
+DECL_TEMPLATE(linux, sys_memfd_create);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
Wrappers for sockets and ipc-ery. These are split into standalone
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
index ae696b1..88802fb 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
@@ -1078,8 +1078,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
// LIN__(__NR_sched_getattr, sys_ni_syscall), // 315
|
|
||||||
// LIN__(__NR_renameat2, sys_ni_syscall), // 316
|
|
||||||
// LIN__(__NR_seccomp, sys_ni_syscall), // 317
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 318
|
|
||||||
-// LIN__(__NR_memfd_create, sys_ni_syscall), // 319
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 318
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 319
|
|
||||||
|
|
||||||
// LIN__(__NR_kexec_file_load, sys_ni_syscall), // 320
|
|
||||||
// LIN__(__NR_bpf, sys_ni_syscall) // 321
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
index 4293800..200b0d1 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
@@ -1215,7 +1215,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 371
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 372
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 374
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 384
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 384
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 385
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index 56fafac..a72392f 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1037,6 +1037,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev), // 271
|
|
||||||
LINXY(__NR_getrandom, sys_getrandom), // 278
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create), // 279
|
|
||||||
|
|
||||||
// The numbers below are bogus. (See comment further down.)
|
|
||||||
// When pulling entries above this line, change the numbers
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
index f0bd3cb..7c72545 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
@@ -3018,6 +3018,26 @@ POST(sys_getrandom)
|
|
||||||
POST_MEM_WRITE( ARG1, ARG2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
+PRE(sys_memfd_create)
|
|
||||||
+{
|
|
||||||
+ PRINT("sys_memfd_create ( %#lx, %ld )" , ARG1,ARG2);
|
|
||||||
+ PRE_REG_READ2(int, "memfd_create",
|
|
||||||
+ char *, uname, unsigned int, flags);
|
|
||||||
+ PRE_MEM_RASCIIZ( "memfd_create(uname)", ARG1 );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+POST(sys_memfd_create)
|
|
||||||
+{
|
|
||||||
+ vg_assert(SUCCESS);
|
|
||||||
+ if (!ML_(fd_allowed)(RES, "memfd_create", tid, True)) {
|
|
||||||
+ VG_(close)(RES);
|
|
||||||
+ SET_STATUS_Failure( VKI_EMFILE );
|
|
||||||
+ } else {
|
|
||||||
+ if (VG_(clo_track_fds))
|
|
||||||
+ ML_(record_fd_open_nameless)(tid, RES);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
utime wrapper
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
index bddadd0..fa921c1 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
@@ -1118,7 +1118,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY (__NR_process_vm_readv, sys_process_vm_readv), // 345
|
|
||||||
LINX_ (__NR_process_vm_writev, sys_process_vm_writev), // 346
|
|
||||||
//..
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 353
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 353
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 354
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry* ML_(get_linux_syscall_entry) (UInt sysno)
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
index c51ab6f..f8340ab 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
@@ -910,7 +910,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY (__NR_clock_adjtime, sys_clock_adjtime),
|
|
||||||
LINXY (__NR_process_vm_readv, sys_process_vm_readv),
|
|
||||||
LINX_ (__NR_process_vm_writev, sys_process_vm_writev),
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom)
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom),
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create)
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno )
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
index 5c058c2..6b53abe 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
@@ -1258,7 +1258,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
|
|
||||||
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 359
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 359
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 360
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index c173593..25e0bde 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -1157,7 +1157,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
|
|
||||||
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 359
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 359
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 360
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
index 6363e2d..ca969c8 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
@@ -1050,9 +1050,9 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
// ?????(__NR_sched_getattr, ), // 346
|
|
||||||
// ?????(__NR_renameat2, ), // 347
|
|
||||||
// ?????(__NR_seccomp, ), // 348
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 349
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 349
|
|
||||||
|
|
||||||
-// ?????(__NR_memfd_create, ), // 350
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 350
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
index dcbf425..0e87679 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
@@ -1821,8 +1821,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
// LIN__(__NR_renameat2, sys_ni_syscall), // 353
|
|
||||||
// LIN__(__NR_seccomp, sys_ni_syscall), // 354
|
|
||||||
|
|
||||||
- LINXY(__NR_getrandom, sys_getrandom) // 355
|
|
||||||
-// LIN__(__NR_memfd_create, sys_ni_syscall), // 356
|
|
||||||
+ LINXY(__NR_getrandom, sys_getrandom), // 355
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create) // 356
|
|
||||||
// LIN__(__NR_bpf, sys_ni_syscall) // 357
|
|
||||||
};
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
commit 6b5fb6710eaa4151e3aea77355d8fa3366312857
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Jul 7 13:01:39 2015 +0000
|
|
||||||
|
|
||||||
349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15397 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
|
|
||||||
index d4e5449..0f366bf 100644
|
|
||||||
--- a/shared/vg_replace_strmem.c
|
|
||||||
+++ b/shared/vg_replace_strmem.c
|
|
||||||
@@ -1141,6 +1141,10 @@ static inline void my_exit ( int x )
|
|
||||||
#if defined(VGO_linux)
|
|
||||||
MEMMOVE(VG_Z_LIBC_SONAME, memmove)
|
|
||||||
MEMMOVE(VG_Z_LIBC_SONAME, __GI_memmove)
|
|
||||||
+ /* See bug #349828 Override for ld64.so.1 like memcpy, because for some
|
|
||||||
+ arches MEMCPY_OK_FOR_FORWARD_MEMMOVE is set, which might cause memmove
|
|
||||||
+ to call memcpy. */
|
|
||||||
+ MEMMOVE(VG_Z_LD64_SO_1, memmove)
|
|
||||||
|
|
||||||
#elif defined(VGO_darwin)
|
|
||||||
# if DARWIN_VERS <= DARWIN_10_6
|
|
@ -1,20 +0,0 @@
|
|||||||
commit a7abe3d4ad8757a65b53230755a12b9ae5e79ffa
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Jan 13 16:10:20 2015 +0000
|
|
||||||
|
|
||||||
BZ #342795 Internal glibc __GI_mempcpy call should be intercepted.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14866 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
|
|
||||||
index 4ca652b..5203306 100644
|
|
||||||
--- a/shared/vg_replace_strmem.c
|
|
||||||
+++ b/shared/vg_replace_strmem.c
|
|
||||||
@@ -1363,6 +1363,7 @@ static inline void my_exit ( int x )
|
|
||||||
|
|
||||||
#if defined(VGO_linux)
|
|
||||||
GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, mempcpy)
|
|
||||||
+ GLIBC25_MEMPCPY(VG_Z_LIBC_SONAME, __GI_mempcpy)
|
|
||||||
GLIBC25_MEMPCPY(VG_Z_LD_SO_1, mempcpy) /* ld.so.1 */
|
|
||||||
GLIBC25_MEMPCPY(VG_Z_LD_LINUX_SO_3, mempcpy) /* ld-linux.so.3 */
|
|
||||||
GLIBC25_MEMPCPY(VG_Z_LD_LINUX_X86_64_SO_2, mempcpy) /* ld-linux-x86-64.so.2 */
|
|
@ -1,26 +0,0 @@
|
|||||||
commit c79fe53e9e31d5c8e5d2ad3a0943b21e84129ccb
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Feb 10 13:39:04 2015 +0000
|
|
||||||
|
|
||||||
Bug #344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344)
|
|
||||||
|
|
||||||
ppc64 might fall back to socketcall in some cases, but arm64 always uses
|
|
||||||
accept4 syscall directly. Some (confusing) background on when/how glibc
|
|
||||||
(wrongly) decides to use a direct accept4 or the socketcall system call:
|
|
||||||
https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14926 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index 25e0bde..8d5fa08 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -1152,6 +1152,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINX_(__NR_pwritev, sys_pwritev), // 321
|
|
||||||
LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322
|
|
||||||
|
|
||||||
+ LINXY(__NR_accept4, sys_accept4), // 344
|
|
||||||
+
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
@ -1,246 +0,0 @@
|
|||||||
commit a7907a271cd158db319edc516299353213acb958
|
|
||||||
Author: carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Thu Apr 9 16:23:20 2015 +0000
|
|
||||||
|
|
||||||
ADD AT_DCACHEBSIZE and AT_HWCAP2 support for POWER PC
|
|
||||||
|
|
||||||
Valgrind currently does not support the following AUX vector entries:
|
|
||||||
AT_DCACHEBSIZE, and AT_HWCAP2. By default these entries are suppressed by
|
|
||||||
Valgrind. The attached patch adds the needed support so the user level programs
|
|
||||||
can correctly determine that hardware level they are running on. Specifically
|
|
||||||
that the ISA 2.07 for Power 8 is supported.
|
|
||||||
|
|
||||||
Bugzilla 345695
|
|
||||||
|
|
||||||
This fix adds the needed support. It makes a minor change to allow the
|
|
||||||
VEX settings of the host platform to be passed down so they can be checked
|
|
||||||
against the HWCAP values.
|
|
||||||
|
|
||||||
The files touched are:
|
|
||||||
coregrind/m_initimg/initimg-linux.c
|
|
||||||
coregrind/pub_core_initimg.h
|
|
||||||
coregrind/m_main.c
|
|
||||||
|
|
||||||
committed by Carl Love cel@us.ibm.com
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15078 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
|
|
||||||
index 964e355..b198dbf 100644
|
|
||||||
--- a/coregrind/m_initimg/initimg-linux.c
|
|
||||||
+++ b/coregrind/m_initimg/initimg-linux.c
|
|
||||||
@@ -246,6 +246,10 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)
|
|
||||||
/*=== Setting up the client's stack ===*/
|
|
||||||
/*====================================================================*/
|
|
||||||
|
|
||||||
+#ifndef AT_DCACHEBSIZE
|
|
||||||
+#define AT_DCACHEBSIZE 19
|
|
||||||
+#endif /* AT_DCACHEBSIZE */
|
|
||||||
+
|
|
||||||
#ifndef AT_ICACHEBSIZE
|
|
||||||
#define AT_ICACHEBSIZE 20
|
|
||||||
#endif /* AT_ICACHEBSIZE */
|
|
||||||
@@ -262,6 +266,10 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)
|
|
||||||
#define AT_RANDOM 25
|
|
||||||
#endif /* AT_RANDOM */
|
|
||||||
|
|
||||||
+#ifndef AT_HWCAP2
|
|
||||||
+#define AT_HWCAP2 26
|
|
||||||
+#endif /* AT_HWCAP2 */
|
|
||||||
+
|
|
||||||
#ifndef AT_EXECFN
|
|
||||||
#define AT_EXECFN 31
|
|
||||||
#endif /* AT_EXECFN */
|
|
||||||
@@ -377,8 +385,14 @@ Addr setup_client_stack( void* init_sp,
|
|
||||||
const ExeInfo* info,
|
|
||||||
UInt** client_auxv,
|
|
||||||
Addr clstack_end,
|
|
||||||
- SizeT clstack_max_size )
|
|
||||||
+ SizeT clstack_max_size,
|
|
||||||
+ const VexArchInfo* vex_archinfo )
|
|
||||||
{
|
|
||||||
+ /* The HW configuration setting (hwcaps) of the target can be
|
|
||||||
+ * checked against the Vex settings of the host platform as given
|
|
||||||
+ * by the values in vex_archinfo.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
SysRes res;
|
|
||||||
HChar **cpp;
|
|
||||||
HChar *strtab; /* string table */
|
|
||||||
@@ -690,8 +704,44 @@ Addr setup_client_stack( void* init_sp,
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
break;
|
|
||||||
+# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
|
||||||
+ case AT_HWCAP2:
|
|
||||||
+ /* The HWCAP2 value has the entry arch_2_07 which indicates the
|
|
||||||
+ * processor is a Power 8 or beyond. The Valgrind vai.hwcaps
|
|
||||||
+ * value (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
|
|
||||||
+ * flag set so Valgrind knows about Power8. Need to pass the
|
|
||||||
+ * HWCAP2 value along so the user level programs can detect that
|
|
||||||
+ * the processor supports ISA 2.07 and beyond.
|
|
||||||
+ */
|
|
||||||
+ /* Power Architecture 64-Bit ELF V2 ABI Specification
|
|
||||||
+ July 21, 2014, version 1.0, Page 124
|
|
||||||
+ www-03.ibm.com/technologyconnect/tgcm/TGCMServlet.wss?alias=OpenPOWER&linkid=1n0000
|
|
||||||
+
|
|
||||||
+ AT_HWCAP2
|
|
||||||
+ The a_val member of this entry is a bit map of hardware
|
|
||||||
+ capabilities. Some bit mask values include:
|
|
||||||
+
|
|
||||||
+ PPC_FEATURE2_ARCH_2_07 0x80000000
|
|
||||||
+ PPC_FEATURE2_HAS_HTM 0x40000000
|
|
||||||
+ PPC_FEATURE2_HAS_DSCR 0x20000000
|
|
||||||
+ PPC_FEATURE2_HAS_EBB 0x10000000
|
|
||||||
+ PPC_FEATURE2_HAS_ISEL 0x08000000
|
|
||||||
+ PPC_FEATURE2_HAS_TAR 0x04000000
|
|
||||||
+ PPC_FEATURE2_HAS_VCRYPTO 0x02000000
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ if ((auxv->u.a_val & ~(0x80000000ULL)) != 0) {
|
|
||||||
+ /* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
|
|
||||||
+ * that arch_2_07 is also set in VEX HWCAPS
|
|
||||||
+ */
|
|
||||||
+ vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ break;
|
|
||||||
+# endif
|
|
||||||
|
|
||||||
case AT_ICACHEBSIZE:
|
|
||||||
+ case AT_DCACHEBSIZE:
|
|
||||||
case AT_UCACHEBSIZE:
|
|
||||||
# if defined(VGP_ppc32_linux)
|
|
||||||
/* acquire cache info */
|
|
||||||
@@ -852,7 +902,8 @@ static void setup_client_dataseg ( SizeT max_size )
|
|
||||||
/*====================================================================*/
|
|
||||||
|
|
||||||
/* Create the client's initial memory image. */
|
|
||||||
-IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo iicii )
|
|
||||||
+IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo iicii,
|
|
||||||
+ const VexArchInfo* vex_archinfo )
|
|
||||||
{
|
|
||||||
ExeInfo info;
|
|
||||||
HChar** env = NULL;
|
|
||||||
@@ -913,7 +964,8 @@ IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo iicii )
|
|
||||||
iifii.initial_client_SP
|
|
||||||
= setup_client_stack( init_sp, env,
|
|
||||||
&info, &iifii.client_auxv,
|
|
||||||
- iicii.clstack_end, iifii.clstack_max_size );
|
|
||||||
+ iicii.clstack_end, iifii.clstack_max_size,
|
|
||||||
+ vex_archinfo );
|
|
||||||
|
|
||||||
VG_(free)(env);
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_main.c b/coregrind/m_main.c
|
|
||||||
index 732e60e..05ddc35 100644
|
|
||||||
--- a/coregrind/m_main.c
|
|
||||||
+++ b/coregrind/m_main.c
|
|
||||||
@@ -1822,9 +1822,12 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
|
|
||||||
//--------------------------------------------------------------
|
|
||||||
// Figure out what sort of CPU we're on, and whether it is
|
|
||||||
// able to run V.
|
|
||||||
+ /* The vex_archinfo structure is passed down later to the client
|
|
||||||
+ * to verify the HW info settings are consistent.
|
|
||||||
+ */
|
|
||||||
+ VexArchInfo vex_archinfo;
|
|
||||||
VG_(debugLog)(1, "main", "Get hardware capabilities ...\n");
|
|
||||||
{ VexArch vex_arch;
|
|
||||||
- VexArchInfo vex_archinfo;
|
|
||||||
Bool ok = VG_(machine_get_hwcaps)();
|
|
||||||
if (!ok) {
|
|
||||||
VG_(printf)("\n");
|
|
||||||
@@ -1952,7 +1955,7 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* NOTE: this call reads VG_(clo_main_stacksize). */
|
|
||||||
- the_iifii = VG_(ii_create_image)( the_iicii );
|
|
||||||
+ the_iifii = VG_(ii_create_image)( the_iicii, &vex_archinfo );
|
|
||||||
}
|
|
||||||
|
|
||||||
//==============================================================
|
|
||||||
diff --git a/coregrind/pub_core_initimg.h b/coregrind/pub_core_initimg.h
|
|
||||||
index 5623498..428b0c2 100644
|
|
||||||
--- a/coregrind/pub_core_initimg.h
|
|
||||||
+++ b/coregrind/pub_core_initimg.h
|
|
||||||
@@ -33,6 +33,7 @@
|
|
||||||
#define __PUB_CORE_INITIMG_H
|
|
||||||
|
|
||||||
#include "pub_core_basics.h" // Addr
|
|
||||||
+#include "libvex.h"
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// PURPOSE: Map the client executable into memory, then set up its
|
|
||||||
@@ -50,7 +51,8 @@ typedef struct _IIFinaliseImageInfo IIFinaliseImageInfo;
|
|
||||||
structure, which is gathered in an OS-specific way at startup.
|
|
||||||
This returns an IIFinaliseImageInfo structure: */
|
|
||||||
extern
|
|
||||||
-IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo );
|
|
||||||
+IIFinaliseImageInfo VG_(ii_create_image)( IICreateImageInfo,
|
|
||||||
+ const VexArchInfo* vex_archinfo );
|
|
||||||
|
|
||||||
/* Just before starting the client, we may need to make final
|
|
||||||
adjustments to its initial image. Also we need to set up the VEX
|
|
||||||
commit 21340a2747ac0dbe531949f2e6fbdb2683f1e444
|
|
||||||
Author: carll <carll@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue May 19 16:08:05 2015 +0000
|
|
||||||
|
|
||||||
Fix for the HWCAP2 aux vector.
|
|
||||||
|
|
||||||
The support assumed that if HWCAP2 is present that the system also supports
|
|
||||||
ISA2.07. That assumption is not correct as we have found a few systems (OS)
|
|
||||||
where the HWCAP2 entry is present but the ISA2.07 bit is not set. This patch
|
|
||||||
fixes the assertion test to specifically check the ISA2.07 support bit setting
|
|
||||||
in the HWCAP2 and vex_archinfo->hwcaps variable. The setting for the
|
|
||||||
ISA2.07 support must be the same in both variables if the HWCAP2 entry exists.
|
|
||||||
|
|
||||||
This patch updates Vagrind bugzilla 345695.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15257 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
|
|
||||||
index cd0b7f3..d8ff159 100644
|
|
||||||
--- a/coregrind/m_initimg/initimg-linux.c
|
|
||||||
+++ b/coregrind/m_initimg/initimg-linux.c
|
|
||||||
@@ -704,10 +704,12 @@ Addr setup_client_stack( void* init_sp,
|
|
||||||
# endif
|
|
||||||
break;
|
|
||||||
# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
|
||||||
- case AT_HWCAP2:
|
|
||||||
- /* The HWCAP2 value has the entry arch_2_07 which indicates the
|
|
||||||
- * processor is a Power 8 or beyond. The Valgrind vai.hwcaps
|
|
||||||
- * value (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
|
|
||||||
+ case AT_HWCAP2: {
|
|
||||||
+ Bool auxv_2_07, hw_caps_2_07;
|
|
||||||
+ /* The HWCAP2 field may contain an arch_2_07 entry that indicates
|
|
||||||
+ * if the processor is compliant with the 2.07 ISA. (i.e. Power 8
|
|
||||||
+ * or beyond). The Valgrind vai.hwcaps value
|
|
||||||
+ * (coregrind/m_machine.c) has the VEX_HWCAPS_PPC64_ISA2_07
|
|
||||||
* flag set so Valgrind knows about Power8. Need to pass the
|
|
||||||
* HWCAP2 value along so the user level programs can detect that
|
|
||||||
* the processor supports ISA 2.07 and beyond.
|
|
||||||
@@ -728,13 +730,15 @@ Addr setup_client_stack( void* init_sp,
|
|
||||||
PPC_FEATURE2_HAS_TAR 0x04000000
|
|
||||||
PPC_FEATURE2_HAS_VCRYPTO 0x02000000
|
|
||||||
*/
|
|
||||||
-
|
|
||||||
- if ((auxv->u.a_val & ~(0x80000000ULL)) != 0) {
|
|
||||||
- /* Verify if PPC_FEATURE2_ARCH_2_07 is set in HWCAP2
|
|
||||||
- * that arch_2_07 is also set in VEX HWCAPS
|
|
||||||
- */
|
|
||||||
- vg_assert((vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07) == VEX_HWCAPS_PPC64_ISA2_07);
|
|
||||||
- }
|
|
||||||
+ auxv_2_07 = (auxv->u.a_val & 0x80000000ULL) == 0x80000000ULL;
|
|
||||||
+ hw_caps_2_07 = (vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07)
|
|
||||||
+ == VEX_HWCAPS_PPC64_ISA2_07;
|
|
||||||
+
|
|
||||||
+ /* Verify the PPC_FEATURE2_ARCH_2_07 setting in HWCAP2
|
|
||||||
+ * matches the setting in VEX HWCAPS.
|
|
||||||
+ */
|
|
||||||
+ vg_assert(auxv_2_07 == hw_caps_2_07);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
break;
|
|
||||||
# endif
|
|
@ -1,301 +0,0 @@
|
|||||||
Subject: [PATCH v2] s390x: Fix unrecognized instruction fiebra
|
|
||||||
|
|
||||||
Add support for the z/Architecture instructions FIEBRA and FIDBRA.
|
|
||||||
Also add a suitable test case.
|
|
||||||
|
|
||||||
GCC may emit FIEBRA since the following GCC patch:
|
|
||||||
|
|
||||||
S/390: Add support for the "load fp integer" instructions:
|
|
||||||
https://gcc.gnu.org/ml/gcc-patches/2013-09/msg00112.html
|
|
||||||
|
|
||||||
Index: valgrind/none/tests/s390x/rounding-6.c
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/none/tests/s390x/rounding-6.c
|
|
||||||
+++ valgrind/none/tests/s390x/rounding-6.c
|
|
||||||
@@ -44,6 +44,20 @@ do { \
|
|
||||||
opcode, src, dst, cc, rtext(round)); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
+#define round_to_int(opcode,type,round,value) \
|
|
||||||
+do { \
|
|
||||||
+ type src = value; \
|
|
||||||
+ type dst; \
|
|
||||||
+ \
|
|
||||||
+ __asm__ volatile (opcode " %[dst]," #round ",%[src]\n\t" \
|
|
||||||
+ : [dst] "=f"(dst) \
|
|
||||||
+ : [src] "f"(src) \
|
|
||||||
+ : ); \
|
|
||||||
+ \
|
|
||||||
+ printf("%s %.5f\t-> %g %s\n", \
|
|
||||||
+ opcode, src, dst, rtext(round)); \
|
|
||||||
+} while (0)
|
|
||||||
+
|
|
||||||
|
|
||||||
#define cfebr(value, round) \
|
|
||||||
convert_to_int("cfebr",float,int32_t,PRId32,round,value)
|
|
||||||
@@ -54,6 +68,11 @@ do { \
|
|
||||||
#define cgdbr(value, round) \
|
|
||||||
convert_to_int("cgdbr",double,int64_t,PRId64,round,value)
|
|
||||||
|
|
||||||
+#define fiebr(value, round) \
|
|
||||||
+ round_to_int("fiebr",float,round,value)
|
|
||||||
+#define fidbr(value, round) \
|
|
||||||
+ round_to_int("fidbr",double,round,value)
|
|
||||||
+
|
|
||||||
void
|
|
||||||
set_rounding_mode(unsigned mode)
|
|
||||||
{
|
|
||||||
@@ -117,5 +136,25 @@ int main(void)
|
|
||||||
cgdbr(dval[j], M3_BFP_ROUND_NEGINF);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* f32 -> f32, round to int */
|
|
||||||
+ for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) {
|
|
||||||
+ set_rounding_mode(FPC_BFP_ROUND_ZERO);
|
|
||||||
+ fiebr(dval[j], M3_BFP_ROUND_NEAREST_EVEN);
|
|
||||||
+ set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN);
|
|
||||||
+ fiebr(dval[j], M3_BFP_ROUND_ZERO);
|
|
||||||
+ fiebr(dval[j], M3_BFP_ROUND_POSINF);
|
|
||||||
+ fiebr(dval[j], M3_BFP_ROUND_NEGINF);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* f64 -> f64, round to int */
|
|
||||||
+ for (j = 0; j < sizeof dval / sizeof dval[0]; ++j) {
|
|
||||||
+ set_rounding_mode(FPC_BFP_ROUND_ZERO);
|
|
||||||
+ fidbr(dval[j], M3_BFP_ROUND_NEAREST_EVEN);
|
|
||||||
+ set_rounding_mode(FPC_BFP_ROUND_NEAREST_EVEN);
|
|
||||||
+ fidbr(dval[j], M3_BFP_ROUND_ZERO);
|
|
||||||
+ fidbr(dval[j], M3_BFP_ROUND_POSINF);
|
|
||||||
+ fidbr(dval[j], M3_BFP_ROUND_NEGINF);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Index: valgrind/none/tests/s390x/rounding-6.stdout.exp
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/none/tests/s390x/rounding-6.stdout.exp
|
|
||||||
+++ valgrind/none/tests/s390x/rounding-6.stdout.exp
|
|
||||||
@@ -142,3 +142,75 @@ cgdbr 0.000000 -> 0 cc = 0 [-> nearest
|
|
||||||
cgdbr 0.000000 -> 0 cc = 0 [-> 0]
|
|
||||||
cgdbr 0.000000 -> 0 cc = 0 [-> +inf]
|
|
||||||
cgdbr 0.000000 -> 0 cc = 0 [-> -inf]
|
|
||||||
+fiebr 1.25000 -> 1 [-> nearest even]
|
|
||||||
+fiebr 1.25000 -> 1 [-> 0]
|
|
||||||
+fiebr 1.25000 -> 2 [-> +inf]
|
|
||||||
+fiebr 1.25000 -> 1 [-> -inf]
|
|
||||||
+fiebr 1.50000 -> 2 [-> nearest even]
|
|
||||||
+fiebr 1.50000 -> 1 [-> 0]
|
|
||||||
+fiebr 1.50000 -> 2 [-> +inf]
|
|
||||||
+fiebr 1.50000 -> 1 [-> -inf]
|
|
||||||
+fiebr 2.50000 -> 2 [-> nearest even]
|
|
||||||
+fiebr 2.50000 -> 2 [-> 0]
|
|
||||||
+fiebr 2.50000 -> 3 [-> +inf]
|
|
||||||
+fiebr 2.50000 -> 2 [-> -inf]
|
|
||||||
+fiebr 1.75000 -> 2 [-> nearest even]
|
|
||||||
+fiebr 1.75000 -> 1 [-> 0]
|
|
||||||
+fiebr 1.75000 -> 2 [-> +inf]
|
|
||||||
+fiebr 1.75000 -> 1 [-> -inf]
|
|
||||||
+fiebr -1.25000 -> -1 [-> nearest even]
|
|
||||||
+fiebr -1.25000 -> -1 [-> 0]
|
|
||||||
+fiebr -1.25000 -> -1 [-> +inf]
|
|
||||||
+fiebr -1.25000 -> -2 [-> -inf]
|
|
||||||
+fiebr -1.50000 -> -2 [-> nearest even]
|
|
||||||
+fiebr -1.50000 -> -1 [-> 0]
|
|
||||||
+fiebr -1.50000 -> -1 [-> +inf]
|
|
||||||
+fiebr -1.50000 -> -2 [-> -inf]
|
|
||||||
+fiebr -2.50000 -> -2 [-> nearest even]
|
|
||||||
+fiebr -2.50000 -> -2 [-> 0]
|
|
||||||
+fiebr -2.50000 -> -2 [-> +inf]
|
|
||||||
+fiebr -2.50000 -> -3 [-> -inf]
|
|
||||||
+fiebr -1.75000 -> -2 [-> nearest even]
|
|
||||||
+fiebr -1.75000 -> -1 [-> 0]
|
|
||||||
+fiebr -1.75000 -> -1 [-> +inf]
|
|
||||||
+fiebr -1.75000 -> -2 [-> -inf]
|
|
||||||
+fiebr 0.00000 -> 0 [-> nearest even]
|
|
||||||
+fiebr 0.00000 -> 0 [-> 0]
|
|
||||||
+fiebr 0.00000 -> 0 [-> +inf]
|
|
||||||
+fiebr 0.00000 -> 0 [-> -inf]
|
|
||||||
+fidbr 1.25000 -> 1 [-> nearest even]
|
|
||||||
+fidbr 1.25000 -> 1 [-> 0]
|
|
||||||
+fidbr 1.25000 -> 2 [-> +inf]
|
|
||||||
+fidbr 1.25000 -> 1 [-> -inf]
|
|
||||||
+fidbr 1.50000 -> 2 [-> nearest even]
|
|
||||||
+fidbr 1.50000 -> 1 [-> 0]
|
|
||||||
+fidbr 1.50000 -> 2 [-> +inf]
|
|
||||||
+fidbr 1.50000 -> 1 [-> -inf]
|
|
||||||
+fidbr 2.50000 -> 2 [-> nearest even]
|
|
||||||
+fidbr 2.50000 -> 2 [-> 0]
|
|
||||||
+fidbr 2.50000 -> 3 [-> +inf]
|
|
||||||
+fidbr 2.50000 -> 2 [-> -inf]
|
|
||||||
+fidbr 1.75000 -> 2 [-> nearest even]
|
|
||||||
+fidbr 1.75000 -> 1 [-> 0]
|
|
||||||
+fidbr 1.75000 -> 2 [-> +inf]
|
|
||||||
+fidbr 1.75000 -> 1 [-> -inf]
|
|
||||||
+fidbr -1.25000 -> -1 [-> nearest even]
|
|
||||||
+fidbr -1.25000 -> -1 [-> 0]
|
|
||||||
+fidbr -1.25000 -> -1 [-> +inf]
|
|
||||||
+fidbr -1.25000 -> -2 [-> -inf]
|
|
||||||
+fidbr -1.50000 -> -2 [-> nearest even]
|
|
||||||
+fidbr -1.50000 -> -1 [-> 0]
|
|
||||||
+fidbr -1.50000 -> -1 [-> +inf]
|
|
||||||
+fidbr -1.50000 -> -2 [-> -inf]
|
|
||||||
+fidbr -2.50000 -> -2 [-> nearest even]
|
|
||||||
+fidbr -2.50000 -> -2 [-> 0]
|
|
||||||
+fidbr -2.50000 -> -2 [-> +inf]
|
|
||||||
+fidbr -2.50000 -> -3 [-> -inf]
|
|
||||||
+fidbr -1.75000 -> -2 [-> nearest even]
|
|
||||||
+fidbr -1.75000 -> -1 [-> 0]
|
|
||||||
+fidbr -1.75000 -> -1 [-> +inf]
|
|
||||||
+fidbr -1.75000 -> -2 [-> -inf]
|
|
||||||
+fidbr 0.00000 -> 0 [-> nearest even]
|
|
||||||
+fidbr 0.00000 -> 0 [-> 0]
|
|
||||||
+fidbr 0.00000 -> 0 [-> +inf]
|
|
||||||
+fidbr 0.00000 -> 0 [-> -inf]
|
|
||||||
Index: valgrind/VEX/priv/guest_s390_toIR.c
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/VEX/priv/guest_s390_toIR.c
|
|
||||||
+++ valgrind/VEX/priv/guest_s390_toIR.c
|
|
||||||
@@ -12384,6 +12384,32 @@ s390_irgen_LXEB(UChar r1, IRTemp op2addr
|
|
||||||
}
|
|
||||||
|
|
||||||
static const HChar *
|
|
||||||
+s390_irgen_FIEBRA(UChar m3, UChar m4 __attribute__((unused)),
|
|
||||||
+ UChar r1, UChar r2)
|
|
||||||
+{
|
|
||||||
+ IRTemp result = newTemp(Ity_F32);
|
|
||||||
+
|
|
||||||
+ assign(result, binop(Iop_RoundF32toInt, mkexpr(encode_bfp_rounding_mode(m3)),
|
|
||||||
+ get_fpr_w0(r2)));
|
|
||||||
+ put_fpr_w0(r1, mkexpr(result));
|
|
||||||
+
|
|
||||||
+ return "fiebra";
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const HChar *
|
|
||||||
+s390_irgen_FIDBRA(UChar m3, UChar m4 __attribute__((unused)),
|
|
||||||
+ UChar r1, UChar r2)
|
|
||||||
+{
|
|
||||||
+ IRTemp result = newTemp(Ity_F64);
|
|
||||||
+
|
|
||||||
+ assign(result, binop(Iop_RoundF64toInt, mkexpr(encode_bfp_rounding_mode(m3)),
|
|
||||||
+ get_fpr_dw0(r2)));
|
|
||||||
+ put_fpr_dw0(r1, mkexpr(result));
|
|
||||||
+
|
|
||||||
+ return "fidbra";
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const HChar *
|
|
||||||
s390_irgen_LNEBR(UChar r1, UChar r2)
|
|
||||||
{
|
|
||||||
IRTemp result = newTemp(Ity_F32);
|
|
||||||
@@ -14520,11 +14546,15 @@ s390_decode_4byte_and_irgen(const UChar
|
|
||||||
case 0xb350: /* TBEDR */ goto unimplemented;
|
|
||||||
case 0xb351: /* TBDR */ goto unimplemented;
|
|
||||||
case 0xb353: /* DIEBR */ goto unimplemented;
|
|
||||||
- case 0xb357: /* FIEBR */ goto unimplemented;
|
|
||||||
+ case 0xb357: s390_format_RRF_UUFF(s390_irgen_FIEBRA, ovl.fmt.RRF2.m3,
|
|
||||||
+ ovl.fmt.RRF2.m4, ovl.fmt.RRF2.r1,
|
|
||||||
+ ovl.fmt.RRF2.r2); goto ok;
|
|
||||||
case 0xb358: /* THDER */ goto unimplemented;
|
|
||||||
case 0xb359: /* THDR */ goto unimplemented;
|
|
||||||
case 0xb35b: /* DIDBR */ goto unimplemented;
|
|
||||||
- case 0xb35f: /* FIDBR */ goto unimplemented;
|
|
||||||
+ case 0xb35f: s390_format_RRF_UUFF(s390_irgen_FIDBRA, ovl.fmt.RRF2.m3,
|
|
||||||
+ ovl.fmt.RRF2.m4, ovl.fmt.RRF2.r1,
|
|
||||||
+ ovl.fmt.RRF2.r2); goto ok;
|
|
||||||
case 0xb360: /* LPXR */ goto unimplemented;
|
|
||||||
case 0xb361: /* LNXR */ goto unimplemented;
|
|
||||||
case 0xb362: /* LTXR */ goto unimplemented;
|
|
||||||
Index: valgrind/VEX/priv/host_s390_defs.c
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/VEX/priv/host_s390_defs.c
|
|
||||||
+++ valgrind/VEX/priv/host_s390_defs.c
|
|
||||||
@@ -3939,6 +3939,40 @@ s390_emit_LEXBRA(UChar *p, UChar m3, UCh
|
|
||||||
|
|
||||||
|
|
||||||
static UChar *
|
|
||||||
+s390_emit_FIEBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
|
|
||||||
+{
|
|
||||||
+ vassert(m3 == 0 || s390_host_has_fpext);
|
|
||||||
+
|
|
||||||
+ if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) {
|
|
||||||
+ if (m4 == 0)
|
|
||||||
+ s390_disasm(ENC4(MNM, FPR, UINT, FPR), "fiebr", r1, m3, r2);
|
|
||||||
+ else
|
|
||||||
+ s390_disasm(ENC5(MNM, FPR, UINT, FPR, UINT),
|
|
||||||
+ "fiebra", r1, m3, r2, m4);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return emit_RRF2(p, 0xb3570000, m3, m4, r1, r2);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static UChar *
|
|
||||||
+s390_emit_FIDBRA(UChar *p, UChar m3, UChar m4, UChar r1, UChar r2)
|
|
||||||
+{
|
|
||||||
+ vassert(m3 == 0 || s390_host_has_fpext);
|
|
||||||
+
|
|
||||||
+ if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) {
|
|
||||||
+ if (m4 == 0)
|
|
||||||
+ s390_disasm(ENC4(MNM, FPR, UINT, FPR), "fidbr", r1, m3, r2);
|
|
||||||
+ else
|
|
||||||
+ s390_disasm(ENC5(MNM, FPR, UINT, FPR, UINT),
|
|
||||||
+ "fidbra", r1, m3, r2, m4);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return emit_RRF2(p, 0xb35f0000, m3, m4, r1, r2);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static UChar *
|
|
||||||
s390_emit_MEEBR(UChar *p, UChar r1, UChar r2)
|
|
||||||
{
|
|
||||||
if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
|
|
||||||
@@ -6693,6 +6727,8 @@ s390_insn_as_string(const s390_insn *ins
|
|
||||||
case S390_BFP_F64_TO_F128:
|
|
||||||
case S390_BFP_F128_TO_F32:
|
|
||||||
case S390_BFP_F128_TO_F64: op = "v-f2f"; break;
|
|
||||||
+ case S390_BFP_F32_TO_F32I:
|
|
||||||
+ case S390_BFP_F64_TO_F64I: op = "v-f2fi"; break;
|
|
||||||
default: goto fail;
|
|
||||||
}
|
|
||||||
s390_sprintf(buf, "%M %R,%R", op, insn->variant.bfp_convert.dst_hi,
|
|
||||||
@@ -8964,6 +9000,10 @@ s390_insn_bfp_convert_emit(UChar *buf, c
|
|
||||||
case S390_BFP_F128_TO_F32: return s390_emit_LEXBRA(buf, m3, m4, r1, r2);
|
|
||||||
case S390_BFP_F128_TO_F64: return s390_emit_LDXBRA(buf, m3, m4, r1, r2);
|
|
||||||
|
|
||||||
+ /* Load FP integer */
|
|
||||||
+ case S390_BFP_F32_TO_F32I: return s390_emit_FIEBRA(buf, m3, m4, r1, r2);
|
|
||||||
+ case S390_BFP_F64_TO_F64I: return s390_emit_FIDBRA(buf, m3, m4, r1, r2);
|
|
||||||
+
|
|
||||||
default: goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
Index: valgrind/VEX/priv/host_s390_defs.h
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/VEX/priv/host_s390_defs.h
|
|
||||||
+++ valgrind/VEX/priv/host_s390_defs.h
|
|
||||||
@@ -242,7 +242,9 @@ typedef enum {
|
|
||||||
S390_BFP_F128_TO_U32,
|
|
||||||
S390_BFP_F128_TO_U64,
|
|
||||||
S390_BFP_F128_TO_F32,
|
|
||||||
- S390_BFP_F128_TO_F64
|
|
||||||
+ S390_BFP_F128_TO_F64,
|
|
||||||
+ S390_BFP_F32_TO_F32I,
|
|
||||||
+ S390_BFP_F64_TO_F64I
|
|
||||||
} s390_bfp_conv_t;
|
|
||||||
|
|
||||||
/* Type conversion operations: to and/or from decimal floating point */
|
|
||||||
Index: valgrind/VEX/priv/host_s390_isel.c
|
|
||||||
===================================================================
|
|
||||||
--- valgrind.orig/VEX/priv/host_s390_isel.c
|
|
||||||
+++ valgrind/VEX/priv/host_s390_isel.c
|
|
||||||
@@ -2378,6 +2378,8 @@ s390_isel_float_expr_wrk(ISelEnv *env, I
|
|
||||||
return dst;
|
|
||||||
|
|
||||||
case Iop_F64toF32: conv = S390_BFP_F64_TO_F32; goto convert_float;
|
|
||||||
+ case Iop_RoundF32toInt: conv = S390_BFP_F32_TO_F32I; goto convert_float;
|
|
||||||
+ case Iop_RoundF64toInt: conv = S390_BFP_F64_TO_F64I; goto convert_float;
|
|
||||||
case Iop_I32StoF32: conv = S390_BFP_I32_TO_F32; goto convert_int;
|
|
||||||
case Iop_I32UtoF32: conv = S390_BFP_U32_TO_F32; goto convert_int;
|
|
||||||
case Iop_I64StoF32: conv = S390_BFP_I64_TO_F32; goto convert_int;
|
|
@ -1,294 +0,0 @@
|
|||||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
index 4a8d7e1..d093974 100644
|
|
||||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
@@ -305,6 +305,10 @@ extern void ML_(linux_POST_sys_msgctl) ( TId, UW, UW, UW, UW );
|
|
||||||
extern void ML_(linux_PRE_sys_getsockopt) ( TId, UW, UW, UW, UW, UW );
|
|
||||||
extern void ML_(linux_POST_sys_getsockopt) ( TId, SR, UW, UW, UW, UW, UW );
|
|
||||||
extern void ML_(linux_PRE_sys_setsockopt) ( TId, UW, UW, UW, UW, UW );
|
|
||||||
+extern void ML_(linux_PRE_sys_recvmmsg) ( TId, UW, UW, UW, UW, UW );
|
|
||||||
+extern void ML_(linux_POST_sys_recvmmsg) ( TId, UW, UW, UW, UW, UW, UW );
|
|
||||||
+extern void ML_(linux_PRE_sys_sendmmsg) ( TId, UW, UW, UW, UW );
|
|
||||||
+extern void ML_(linux_POST_sys_sendmmsg) ( TId, UW, UW, UW, UW, UW );
|
|
||||||
|
|
||||||
// Linux-specific (but non-arch-specific) ptrace wrapper helpers
|
|
||||||
extern void ML_(linux_PRE_getregset) ( ThreadId, long, long );
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
index 16df075..10c1fc2 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
@@ -4063,6 +4063,20 @@ PRE(sys_socketcall)
|
|
||||||
ML_(generic_PRE_sys_recvmsg)( tid, "msg", (struct vki_msghdr *)ARG2_1 );
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case VKI_SYS_RECVMMSG:
|
|
||||||
+ /* int recvmmsg(int s, struct mmsghdr *mmsg, int vlen, int flags,
|
|
||||||
+ struct timespec *timeout); */
|
|
||||||
+ PRE_MEM_READ_ef("socketcall.recvmmsg(args)", ARG2, 5*sizeof(Addr) );
|
|
||||||
+ ML_(linux_PRE_sys_recvmmsg)( tid, ARG2_0, ARG2_1, ARG2_2, ARG2_3,
|
|
||||||
+ ARG2_4 );
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case VKI_SYS_SENDMMSG:
|
|
||||||
+ /* int sendmmsg(int s, struct mmsghdr *mmsg, int vlen, int flags); */
|
|
||||||
+ PRE_MEM_READ_ef("socketcall.sendmmsg(args)", ARG2, 4*sizeof(Addr) );
|
|
||||||
+ ML_(linux_PRE_sys_sendmmsg)( tid, ARG2_0, ARG2_1, ARG2_2, ARG2_3 );
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
default:
|
|
||||||
VG_(message)(Vg_DebugMsg,"Warning: unhandled socketcall 0x%lx\n",ARG1);
|
|
||||||
SET_STATUS_Failure( VKI_EINVAL );
|
|
||||||
@@ -4168,6 +4182,15 @@ POST(sys_socketcall)
|
|
||||||
ML_(generic_POST_sys_recvmsg)( tid, "msg", (struct vki_msghdr *)ARG2_1, RES );
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case VKI_SYS_RECVMMSG:
|
|
||||||
+ ML_(linux_POST_sys_recvmmsg)( tid, RES,
|
|
||||||
+ ARG2_0, ARG2_1, ARG2_2, ARG2_3, ARG2_4 );
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case VKI_SYS_SENDMMSG:
|
|
||||||
+ ML_(linux_POST_sys_sendmmsg)( tid, RES, ARG2_0, ARG2_1, ARG2_2, ARG2_3 );
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
default:
|
|
||||||
VG_(message)(Vg_DebugMsg,"FATAL: unhandled socketcall 0x%lx\n",ARG1);
|
|
||||||
VG_(core_panic)("... bye!\n");
|
|
||||||
@@ -4846,64 +4869,31 @@ PRE(sys_process_vm_writev)
|
|
||||||
|
|
||||||
PRE(sys_sendmmsg)
|
|
||||||
{
|
|
||||||
- struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
|
|
||||||
- HChar name[32];
|
|
||||||
- UInt i;
|
|
||||||
*flags |= SfMayBlock;
|
|
||||||
PRINT("sys_sendmmsg ( %ld, %#lx, %ld, %ld )",ARG1,ARG2,ARG3,ARG4);
|
|
||||||
PRE_REG_READ4(long, "sendmmsg",
|
|
||||||
int, s, const struct mmsghdr *, mmsg, int, vlen, int, flags);
|
|
||||||
- for (i = 0; i < ARG3; i++) {
|
|
||||||
- VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
- ML_(generic_PRE_sys_sendmsg)(tid, name, &mmsg[i].msg_hdr);
|
|
||||||
- VG_(sprintf)(name, "sendmmsg(mmsg[%u].msg_len)", i);
|
|
||||||
- PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
- }
|
|
||||||
+ ML_(linux_PRE_sys_sendmmsg)(tid, ARG1,ARG2,ARG3,ARG4);
|
|
||||||
}
|
|
||||||
|
|
||||||
POST(sys_sendmmsg)
|
|
||||||
{
|
|
||||||
- if (RES > 0) {
|
|
||||||
- struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
|
|
||||||
- UInt i;
|
|
||||||
- for (i = 0; i < RES; i++) {
|
|
||||||
- POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ ML_(linux_POST_sys_sendmmsg) (tid, RES, ARG1,ARG2,ARG3,ARG4);
|
|
||||||
}
|
|
||||||
|
|
||||||
PRE(sys_recvmmsg)
|
|
||||||
{
|
|
||||||
- struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
|
|
||||||
- HChar name[32];
|
|
||||||
- UInt i;
|
|
||||||
*flags |= SfMayBlock;
|
|
||||||
PRINT("sys_recvmmsg ( %ld, %#lx, %ld, %ld, %#lx )",ARG1,ARG2,ARG3,ARG4,ARG5);
|
|
||||||
PRE_REG_READ5(long, "recvmmsg",
|
|
||||||
int, s, struct mmsghdr *, mmsg, int, vlen,
|
|
||||||
int, flags, struct timespec *, timeout);
|
|
||||||
- for (i = 0; i < ARG3; i++) {
|
|
||||||
- VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
- ML_(generic_PRE_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr);
|
|
||||||
- VG_(sprintf)(name, "recvmmsg(mmsg[%u].msg_len)", i);
|
|
||||||
- PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
- }
|
|
||||||
- if (ARG5)
|
|
||||||
- PRE_MEM_READ( "recvmmsg(timeout)", ARG5, sizeof(struct vki_timespec) );
|
|
||||||
+ ML_(linux_PRE_sys_recvmmsg)(tid, ARG1,ARG2,ARG3,ARG4,ARG5);
|
|
||||||
}
|
|
||||||
|
|
||||||
POST(sys_recvmmsg)
|
|
||||||
{
|
|
||||||
- if (RES > 0) {
|
|
||||||
- struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)ARG2;
|
|
||||||
- HChar name[32];
|
|
||||||
- UInt i;
|
|
||||||
- for (i = 0; i < RES; i++) {
|
|
||||||
- VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
- ML_(generic_POST_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr, mmsg[i].msg_len);
|
|
||||||
- POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ ML_(linux_POST_sys_recvmmsg) (tid, RES, ARG1,ARG2,ARG3,ARG4,ARG5);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
@@ -10271,6 +10261,69 @@ ML_(linux_PRE_sys_setsockopt) ( ThreadId tid,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+ML_(linux_PRE_sys_recvmmsg) ( ThreadId tid,
|
|
||||||
+ UWord arg1, UWord arg2, UWord arg3,
|
|
||||||
+ UWord arg4, UWord arg5 )
|
|
||||||
+{
|
|
||||||
+ struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
|
|
||||||
+ HChar name[40]; // large enough
|
|
||||||
+ UInt i;
|
|
||||||
+ for (i = 0; i < arg3; i++) {
|
|
||||||
+ VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
+ ML_(generic_PRE_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr);
|
|
||||||
+ VG_(sprintf)(name, "recvmmsg(mmsg[%u].msg_len)", i);
|
|
||||||
+ PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
+ }
|
|
||||||
+ if (arg5)
|
|
||||||
+ PRE_MEM_READ( "recvmmsg(timeout)", arg5, sizeof(struct vki_timespec) );
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+ML_(linux_POST_sys_recvmmsg) (ThreadId tid, UWord res,
|
|
||||||
+ UWord arg1, UWord arg2, UWord arg3,
|
|
||||||
+ UWord arg4, UWord arg5 )
|
|
||||||
+{
|
|
||||||
+ if (res > 0) {
|
|
||||||
+ struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
|
|
||||||
+ HChar name[32]; // large enough
|
|
||||||
+ UInt i;
|
|
||||||
+ for (i = 0; i < res; i++) {
|
|
||||||
+ VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
+ ML_(generic_POST_sys_recvmsg)(tid, name, &mmsg[i].msg_hdr, mmsg[i].msg_len);
|
|
||||||
+ POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+ML_(linux_PRE_sys_sendmmsg) ( ThreadId tid,
|
|
||||||
+ UWord arg1, UWord arg2, UWord arg3, UWord arg4 )
|
|
||||||
+{
|
|
||||||
+ struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
|
|
||||||
+ HChar name[40]; // large enough
|
|
||||||
+ UInt i;
|
|
||||||
+ for (i = 0; i < arg3; i++) {
|
|
||||||
+ VG_(sprintf)(name, "mmsg[%u].msg_hdr", i);
|
|
||||||
+ ML_(generic_PRE_sys_sendmsg)(tid, name, &mmsg[i].msg_hdr);
|
|
||||||
+ VG_(sprintf)(name, "sendmmsg(mmsg[%u].msg_len)", i);
|
|
||||||
+ PRE_MEM_WRITE( name, (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void
|
|
||||||
+ML_(linux_POST_sys_sendmmsg) (ThreadId tid, UWord res,
|
|
||||||
+ UWord arg1, UWord arg2, UWord arg3, UWord arg4 )
|
|
||||||
+{
|
|
||||||
+ if (res > 0) {
|
|
||||||
+ struct vki_mmsghdr *mmsg = (struct vki_mmsghdr *)arg2;
|
|
||||||
+ UInt i;
|
|
||||||
+ for (i = 0; i < res; i++) {
|
|
||||||
+ POST_MEM_WRITE( (Addr)&mmsg[i].msg_len, sizeof(mmsg[i].msg_len) );
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
ptrace wrapper helpers
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
|
|
||||||
index bf3ffee..af5cbaf 100644
|
|
||||||
--- a/include/vki/vki-linux.h
|
|
||||||
+++ b/include/vki/vki-linux.h
|
|
||||||
@@ -596,6 +596,8 @@ typedef struct vki_sigevent {
|
|
||||||
#define VKI_SYS_SENDMSG 16 /* sys_sendmsg(2) */
|
|
||||||
#define VKI_SYS_RECVMSG 17 /* sys_recvmsg(2) */
|
|
||||||
#define VKI_SYS_ACCEPT4 18 /* sys_accept4(2) */
|
|
||||||
+#define VKI_SYS_RECVMMSG 19 /* sys_recvmmsg(2) */
|
|
||||||
+#define VKI_SYS_SENDMMSG 20 /* sys_sendmmsg(2) */
|
|
||||||
|
|
||||||
#ifndef ARCH_HAS_SOCKET_TYPES
|
|
||||||
enum vki_sock_type {
|
|
||||||
commit 4b2fb567b7422b2563c52a0ff2c1c166264a02e0
|
|
||||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Tue Feb 17 16:04:09 2015 +0000
|
|
||||||
|
|
||||||
Bug #344279 syscall sendmmsg on arm64 (269) and ppc32/64 (349) unhandled.
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14939 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index 1f9670a..e8f4a3e 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1043,6 +1043,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 242
|
|
||||||
GENXY(__NR_wait4, sys_wait4), // 260
|
|
||||||
|
|
||||||
+ LINXY(__NR_sendmmsg, sys_sendmmsg), // 269
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev), // 271
|
|
||||||
LINXY(__NR_getrandom, sys_getrandom), // 278
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
index 6b53abe..2ce6673 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
@@ -1255,6 +1255,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
|
|
||||||
LINX_(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
|
|
||||||
+ LINXY(__NR_sendmmsg, sys_sendmmsg), // 349
|
|
||||||
+
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index 8d5fa08..f18a10c 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -1156,6 +1156,8 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
|
|
||||||
+ LINXY(__NR_sendmmsg, sys_sendmmsg), // 349
|
|
||||||
+
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev),// 352
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index e8f4a3e..7b7e824 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1040,7 +1040,10 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINX_(__NR_mbind, sys_mbind), // 235
|
|
||||||
LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 236
|
|
||||||
LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 237
|
|
||||||
+
|
|
||||||
+ LINXY(__NR_recvmmsg, sys_recvmmsg), // 243
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 242
|
|
||||||
+
|
|
||||||
GENXY(__NR_wait4, sys_wait4), // 260
|
|
||||||
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 269
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
index 2ce6673..7f09fc4 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
@@ -1251,6 +1251,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINX_(__NR_shutdown, sys_shutdown), // 338
|
|
||||||
LINX_(__NR_setsockopt, sys_setsockopt), // 339
|
|
||||||
|
|
||||||
+ LINXY(__NR_recvmmsg, sys_recvmmsg), // 343
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 344
|
|
||||||
|
|
||||||
LINX_(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index f18a10c..b309f43 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -1152,6 +1152,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINX_(__NR_pwritev, sys_pwritev), // 321
|
|
||||||
LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322
|
|
||||||
|
|
||||||
+ LINXY(__NR_recvmmsg, sys_recvmmsg), // 343
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 344
|
|
||||||
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
@ -1,158 +0,0 @@
|
|||||||
commit 7c91105917f41c11a0b377b2393725da380cd490
|
|
||||||
Author: tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
|
||||||
Date: Thu May 7 18:54:31 2015 +0000
|
|
||||||
|
|
||||||
Add support for the syncfs system call.
|
|
||||||
|
|
||||||
Based on patch from j@eckel.me on BZ#347389.
|
|
||||||
|
|
||||||
|
|
||||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15191 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
||||||
|
|
||||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
index d093974..6552dca 100644
|
|
||||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
|
||||||
@@ -287,6 +287,8 @@ DECL_TEMPLATE(linux, sys_fanotify_mark);
|
|
||||||
DECL_TEMPLATE(linux, sys_getrandom);
|
|
||||||
DECL_TEMPLATE(linux, sys_memfd_create);
|
|
||||||
|
|
||||||
+DECL_TEMPLATE(linux, sys_syncfs);
|
|
||||||
+
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
Wrappers for sockets and ipc-ery. These are split into standalone
|
|
||||||
procedures because x86-linux hides them inside multiplexors
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
index 62f7ee6..de3288e 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
|
||||||
@@ -1062,7 +1062,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 304
|
|
||||||
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 305
|
|
||||||
-// LINX_(__NR_syncfs, sys_ni_syscall), // 306
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 306
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 307
|
|
||||||
// LINX_(__NR_setns, sys_ni_syscall), // 308
|
|
||||||
LINXY(__NR_getcpu, sys_getcpu), // 309
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
index dc8714c..f8f56f5 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
|
||||||
@@ -1212,6 +1212,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at),// 370
|
|
||||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 371
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 372
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 373
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 374
|
|
||||||
LINXY(__NR_getrandom, sys_getrandom), // 384
|
|
||||||
LINXY(__NR_memfd_create, sys_memfd_create) // 385
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
index 2f35e51..7551e8a 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
|
||||||
@@ -1042,6 +1042,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
|
|
||||||
GENXY(__NR_wait4, sys_wait4), // 260
|
|
||||||
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 267
|
|
||||||
+
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 269
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 270
|
|
||||||
LINX_(__NR_process_vm_writev, sys_process_vm_writev), // 271
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
index f15c909..09c247c 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
|
||||||
@@ -3064,6 +3064,13 @@ POST(sys_memfd_create)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+PRE(sys_syncfs)
|
|
||||||
+{
|
|
||||||
+ *flags |= SfMayBlock;
|
|
||||||
+ PRINT("sys_syncfs ( %ld )", ARG1);
|
|
||||||
+ PRE_REG_READ1(long, "syncfs", unsigned int, fd);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* ---------------------------------------------------------------------
|
|
||||||
utime wrapper
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
index 1b4c5bc..7a71576 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-mips32-linux.c
|
|
||||||
@@ -1112,6 +1112,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY (__NR_prlimit64, sys_prlimit64), // 338
|
|
||||||
//..
|
|
||||||
LINXY (__NR_clock_adjtime, sys_clock_adjtime), // 341
|
|
||||||
+ LINX_ (__NR_syncfs, sys_syncfs), // 342
|
|
||||||
//..
|
|
||||||
LINXY (__NR_process_vm_readv, sys_process_vm_readv), // 345
|
|
||||||
LINX_ (__NR_process_vm_writev, sys_process_vm_writev), // 346
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
index d356645..3a5e979 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-mips64-linux.c
|
|
||||||
@@ -909,7 +909,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
|
||||||
LINXY (__NR_process_vm_readv, sys_process_vm_readv),
|
|
||||||
LINX_ (__NR_process_vm_writev, sys_process_vm_writev),
|
|
||||||
LINXY(__NR_getrandom, sys_getrandom),
|
|
||||||
- LINXY(__NR_memfd_create, sys_memfd_create)
|
|
||||||
+ LINXY(__NR_memfd_create, sys_memfd_create),
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs)
|
|
||||||
};
|
|
||||||
|
|
||||||
SyscallTableEntry * ML_(get_linux_syscall_entry) ( UInt sysno )
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
index 1f5d7f6..9c9937b 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
|
||||||
@@ -1253,7 +1253,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 344
|
|
||||||
|
|
||||||
LINX_(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
-
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 348
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 349
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
index 6f3c1f7..e2432fd 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
|
||||||
@@ -1155,7 +1155,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_accept4, sys_accept4), // 344
|
|
||||||
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 347
|
|
||||||
-
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 348
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 349
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 351
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
index 8e0afa0..db374f4 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
|
||||||
@@ -1035,7 +1035,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at), // 335
|
|
||||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at), // 336
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 337
|
|
||||||
-// ?????(__NR_syncfs, ), // 338
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 338
|
|
||||||
// ?????(__NR_setns, ), // 339
|
|
||||||
|
|
||||||
LINXY(__NR_process_vm_readv, sys_process_vm_readv), // 340
|
|
||||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
index 0f80d4a..e08af76 100644
|
|
||||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
|
||||||
@@ -1805,7 +1805,7 @@ static SyscallTableEntry syscall_table[] = {
|
|
||||||
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at),// 341
|
|
||||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at),// 342
|
|
||||||
LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 343
|
|
||||||
-// LINX_(__NR_syncfs, sys_ni_syscall), // 344
|
|
||||||
+ LINX_(__NR_syncfs, sys_syncfs), // 344
|
|
||||||
|
|
||||||
LINXY(__NR_sendmmsg, sys_sendmmsg), // 345
|
|
||||||
// LINX_(__NR_setns, sys_ni_syscall), // 346
|
|
@ -8,7 +8,7 @@
|
|||||||
Int sets_min_1;
|
Int sets_min_1;
|
||||||
Int line_size_bits;
|
Int line_size_bits;
|
||||||
Int tag_shift;
|
Int tag_shift;
|
||||||
- HChar desc_line[128];
|
- HChar desc_line[128]; /* large enough */
|
||||||
UWord* tags;
|
UWord* tags;
|
||||||
-} cache_t2;
|
-} cache_t2;
|
||||||
+ HChar desc_line[128];
|
+ HChar desc_line[128];
|
||||||
|
100
valgrind.spec
100
valgrind.spec
@ -1,9 +1,12 @@
|
|||||||
%{?scl:%scl_package valgrind}
|
%{?scl:%scl_package valgrind}
|
||||||
|
|
||||||
|
%define svn_date 20150817
|
||||||
|
%define svn_rev 15561
|
||||||
|
|
||||||
Summary: Tool for finding memory management bugs in programs
|
Summary: Tool for finding memory management bugs in programs
|
||||||
Name: %{?scl_prefix}valgrind
|
Name: %{?scl_prefix}valgrind
|
||||||
Version: 3.10.1
|
Version: 3.10.1
|
||||||
Release: 20%{?dist}
|
Release: 21.svn%{?svn_date}r%{?svn_rev}%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.valgrind.org/
|
URL: http://www.valgrind.org/
|
||||||
@ -44,7 +47,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||||||
%define _find_debuginfo_dwz_opts %{nil}
|
%define _find_debuginfo_dwz_opts %{nil}
|
||||||
%undefine _include_minidebuginfo
|
%undefine _include_minidebuginfo
|
||||||
|
|
||||||
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
#Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||||
|
#
|
||||||
|
# svn co svn://svn.valgrind.org/valgrind/trunk valgrind
|
||||||
|
# cd valgrind
|
||||||
|
# ./autogen.sh
|
||||||
|
# ./configure
|
||||||
|
# make dist
|
||||||
|
# tar jxf valgrind-3.11.0.SVN.tar.bz2
|
||||||
|
# mv valgrind-3.11.0.SVN valgrind-3.10.1-svn%{svn_date}r%{svn_rev}
|
||||||
|
# tar jcf valgrind-3.10.1-svn%{svn_date}r%{svn_rev}.tar.bz2 valgrind-3.10.1-svn%{svn_date}r%{svn_rev}
|
||||||
|
Source0: valgrind-%{version}-svn%{svn_date}r%{svn_rev}.tar.bz2
|
||||||
|
|
||||||
|
|
||||||
# Needs investigation and pushing upstream
|
# Needs investigation and pushing upstream
|
||||||
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
||||||
@ -58,64 +72,6 @@ Patch3: valgrind-3.9.0-stat_h.patch
|
|||||||
# Make ld.so supressions slightly less specific.
|
# Make ld.so supressions slightly less specific.
|
||||||
Patch4: valgrind-3.9.0-ldso-supp.patch
|
Patch4: valgrind-3.9.0-ldso-supp.patch
|
||||||
|
|
||||||
# KDE#342795 Internal glibc __GI_mempcpy call should be intercepted
|
|
||||||
Patch5: valgrind-3.10.1-mempcpy.patch
|
|
||||||
|
|
||||||
# KDE#343802 - s390x memcheck reports spurious conditional jump
|
|
||||||
Patch6: valgrind-3.10-s390-spechelper.patch
|
|
||||||
|
|
||||||
# KDE#342038, KDE#343732, KDE#343733, KDE#344007, KDE#344307, KDE##351140
|
|
||||||
# mbind, get_mempolicy, set_mempolicy, flock, setgid, msgget, msgctl,
|
|
||||||
# msgrcv, msgsnd, accept4, mount, umount2, setuid, setresgid
|
|
||||||
Patch7: valgrind-3.10.1-aarch64-syscalls.patch
|
|
||||||
|
|
||||||
# KDE#344007 ppc64 missing accept4 syscall
|
|
||||||
Patch8: valgrind-3.10.1-ppc64-accept4.patch
|
|
||||||
|
|
||||||
# KDE#344279 - syscall sendmmsg on arm64 (269) and ppc32/64 (349) unhandled
|
|
||||||
# KDE#344295 - syscall recvmmsg on arm64 (243) and ppc32/64 (343) unhandled
|
|
||||||
# KDE#344318 - socketcall should wrap recvmmsg and sendmmsg
|
|
||||||
Patch9: valgrind-3.10.1-send-recv-mmsg.patch
|
|
||||||
|
|
||||||
# Upstream valgrind svn r14530
|
|
||||||
Patch10: valgrind-3.10.1-glibc-version-check.patch
|
|
||||||
|
|
||||||
# Upstream valgrind svn r15133
|
|
||||||
Patch11: valgrind-3.10-1-ppc64-sigpending.patch
|
|
||||||
|
|
||||||
# KDE#343012 - Unhandled syscall 319 (memfd_create)
|
|
||||||
Patch12: valgrind-3.10.1-memfd_create.patch
|
|
||||||
|
|
||||||
# KDE#347389 - Add support for the syncfs system call.
|
|
||||||
Patch13: valgrind-3.10.1-syncfs.patch
|
|
||||||
|
|
||||||
# Upstream valgrind svn r15304
|
|
||||||
Patch14: valgrind-3.10.1-arm-process_vm_readv_writev.patch
|
|
||||||
|
|
||||||
# Upstream valgrind svn r15305
|
|
||||||
Patch15: valgrind-3.10.1-fno-ipa-icf.patch
|
|
||||||
|
|
||||||
# Upstream valgrind svn r14780 and r15308
|
|
||||||
Patch16: valgrind-3.10.1-demangle-q.patch
|
|
||||||
|
|
||||||
# KDE#345928 callstack only contains current function for small stacks
|
|
||||||
Patch17: valgrind-3.10.1-cfi-redzone.patch
|
|
||||||
|
|
||||||
# KDE#344499 Fix compilation for Linux kernel >= 4.
|
|
||||||
Patch18: valgrind-3.10.1-kernel-4.0.patch
|
|
||||||
|
|
||||||
# KDE#349941 di_notify_mmap might create wrong start/size DebugInfoMapping
|
|
||||||
Patch19: valgrind-3.10.1-di_notify_mmap.patch
|
|
||||||
|
|
||||||
# KDE#349828 memcpy intercepts memmove causing src/dst overlap error
|
|
||||||
Patch20: valgrind-3.10.1-memmove-ld_so-ppc64.patch
|
|
||||||
|
|
||||||
# KDE#342841 s390x unrecognized instruction fiebra
|
|
||||||
Patch21: valgrind-3.10.1-s390x-fiebra.patch
|
|
||||||
|
|
||||||
# KDE#345695 Add POWERPC support for AT_DCACHESIZE and HWCAP2
|
|
||||||
Patch22: valgrind-3.10.1-ppc64-hwcap2.patch
|
|
||||||
|
|
||||||
%if %{build_multilib}
|
%if %{build_multilib}
|
||||||
# Ensure glibc{,-devel} is installed for both multilib arches
|
# Ensure glibc{,-devel} is installed for both multilib arches
|
||||||
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
|
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
|
||||||
@ -212,30 +168,13 @@ See the section on Debugging MPI Parallel Programs with Valgrind in the
|
|||||||
Valgrind User Manual for details.
|
Valgrind User Manual for details.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}
|
#%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}
|
||||||
|
%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}-svn%{svn_date}r%{svn_rev}
|
||||||
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch18 -p1
|
|
||||||
%patch19 -p1
|
|
||||||
%patch20 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# We need to use the software collection compiler and binutils if available.
|
# We need to use the software collection compiler and binutils if available.
|
||||||
@ -405,6 +344,9 @@ echo ===============END TESTING===============
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 17 2015 Mark Wielaard <mjw@redhat.com> - 3.10.1-21.svn20150817r15561
|
||||||
|
- Update to current valgrind svn. Drop patches now upstream.
|
||||||
|
|
||||||
* Mon Aug 17 2015 Mark Wielaard <mjw@redhat.com> - 3.10.1-20
|
* Mon Aug 17 2015 Mark Wielaard <mjw@redhat.com> - 3.10.1-20
|
||||||
- Don't try to move around libmpiwrap when not building for openmpi (s390x)
|
- Don't try to move around libmpiwrap when not building for openmpi (s390x)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user