3.13.0-0.1.RC1
- Update description as suggested by Ivo Raisr. - Workaround gdb/python bug in testsuite (#1434601) - Update to upstream 3.13.0-RC1. - Drop all upstreamed patches.
This commit is contained in:
parent
ff392b0790
commit
61e695f05f
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@
|
||||
/valgrind-3.12.0.BETA1.tar.bz2
|
||||
/valgrind-3.12.0.RC2.tar.bz2
|
||||
/valgrind-3.12.0.tar.bz2
|
||||
/valgrind-3.13.0.RC1.tar.bz2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
6eb03c0c10ea917013a7622e483d61bb valgrind-3.12.0.tar.bz2
|
||||
SHA512 (valgrind-3.13.0.RC1.tar.bz2) = c23b761f295dd05373e755ef86e0c82d677ea932b588098aedd74c5782c673219f1a7fef8bb8fa676dee9d9963cc28082375f5af8f6e329bd5e86b042f922ec8
|
||||
|
@ -1,444 +0,0 @@
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
index f8b5b7c..60482d7 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
@@ -666,10 +666,11 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_unlinkat, sys_unlinkat), // 35
|
||||
LINX_(__NR_symlinkat, sys_symlinkat), // 36
|
||||
LINX_(__NR_linkat, sys_linkat), // 37
|
||||
- LINX_(__NR_renameat, sys_renameat), // 38
|
||||
+ LINX_(__NR_renameat, sys_renameat), // 38
|
||||
LINX_(__NR_umount2, sys_umount), // 39
|
||||
LINX_(__NR_mount, sys_mount), // 40
|
||||
-
|
||||
+ LINX_(__NR_pivot_root, sys_pivot_root), // 41
|
||||
+ // (__NR_nfsservctl, sys_ni_syscall), // 42
|
||||
GENXY(__NR_statfs, sys_statfs), // 43
|
||||
GENXY(__NR_fstatfs, sys_fstatfs), // 44
|
||||
GENX_(__NR_truncate, sys_truncate), // 45
|
||||
@@ -711,7 +712,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
GENX_(__NR_sync, sys_sync), // 81
|
||||
GENX_(__NR_fsync, sys_fsync), // 82
|
||||
GENX_(__NR_fdatasync, sys_fdatasync), // 83
|
||||
-
|
||||
+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 84
|
||||
LINXY(__NR_timerfd_create, sys_timerfd_create), // 85
|
||||
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 86
|
||||
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 87
|
||||
@@ -724,27 +725,27 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_exit_group, sys_exit_group), // 94
|
||||
LINXY(__NR_waitid, sys_waitid), // 95
|
||||
LINX_(__NR_set_tid_address, sys_set_tid_address), // 96
|
||||
-
|
||||
+ LINX_(__NR_unshare, sys_unshare), // 97
|
||||
LINXY(__NR_futex, sys_futex), // 98
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 99
|
||||
-
|
||||
+ LINXY(__NR_get_robust_list, sys_get_robust_list), // 100
|
||||
GENXY(__NR_nanosleep, sys_nanosleep), // 101
|
||||
GENXY(__NR_getitimer, sys_getitimer), // 102
|
||||
GENXY(__NR_setitimer, sys_setitimer), // 103
|
||||
GENX_(__NR_kexec_load, sys_ni_syscall), // 104
|
||||
LINX_(__NR_init_module, sys_init_module), // 105
|
||||
-
|
||||
+ LINX_(__NR_delete_module, sys_delete_module), // 106
|
||||
LINXY(__NR_timer_create, sys_timer_create), // 107
|
||||
- LINXY(__NR_timer_settime, sys_timer_settime), // 108
|
||||
- LINXY(__NR_timer_gettime, sys_timer_gettime), // 109
|
||||
- LINX_(__NR_timer_getoverrun, sys_timer_getoverrun), // 110
|
||||
+ LINXY(__NR_timer_gettime, sys_timer_gettime), // 108
|
||||
+ LINX_(__NR_timer_getoverrun, sys_timer_getoverrun), // 109
|
||||
+ LINXY(__NR_timer_settime, sys_timer_settime), // 110
|
||||
LINX_(__NR_timer_delete, sys_timer_delete), // 111
|
||||
LINX_(__NR_clock_settime, sys_clock_settime), // 112
|
||||
LINXY(__NR_clock_gettime, sys_clock_gettime), // 113
|
||||
LINXY(__NR_clock_getres, sys_clock_getres), // 114
|
||||
LINXY(__NR_clock_nanosleep, sys_clock_nanosleep), // 115
|
||||
LINXY(__NR_syslog, sys_syslog), // 116
|
||||
-
|
||||
+ // (__NR_ptrace, sys_ptrace), // 117
|
||||
LINXY(__NR_sched_setparam, sys_sched_setparam), // 118
|
||||
LINX_(__NR_sched_setscheduler,sys_sched_setscheduler),// 119
|
||||
LINX_(__NR_sched_getscheduler,sys_sched_getscheduler),// 120
|
||||
@@ -754,9 +755,10 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_sched_yield, sys_sched_yield), // 124
|
||||
LINX_(__NR_sched_get_priority_max, sys_sched_get_priority_max),// 125
|
||||
LINX_(__NR_sched_get_priority_min, sys_sched_get_priority_min),// 126
|
||||
-
|
||||
+ LINXY(__NR_sched_rr_get_interval, sys_sched_rr_get_interval),// 127
|
||||
+ // (__NR_restart_syscall, sys_ni_syscall), // 128
|
||||
GENX_(__NR_kill, sys_kill), // 129
|
||||
-
|
||||
+ LINXY(__NR_tkill, sys_tkill), // 130
|
||||
LINX_(__NR_tgkill, sys_tgkill), // 131
|
||||
GENXY(__NR_sigaltstack, sys_sigaltstack), // 132
|
||||
LINX_(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 133
|
||||
@@ -768,7 +770,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
PLAX_(__NR_rt_sigreturn, sys_rt_sigreturn), // 139
|
||||
GENX_(__NR_setpriority, sys_setpriority), // 140
|
||||
GENX_(__NR_getpriority, sys_getpriority), // 141
|
||||
-
|
||||
+ // (__NR_reboot, sys_ni_syscall), // 142
|
||||
GENX_(__NR_setregid, sys_setregid), // 143
|
||||
GENX_(__NR_setgid, sys_setgid), // 144
|
||||
GENX_(__NR_setreuid, sys_setreuid), // 145
|
||||
@@ -787,13 +789,14 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
GENXY(__NR_getgroups, sys_getgroups), // 158
|
||||
GENX_(__NR_setgroups, sys_setgroups), // 159
|
||||
GENXY(__NR_uname, sys_newuname), // 160
|
||||
-
|
||||
+ GENX_(__NR_sethostname, sys_sethostname), // 161
|
||||
+ // (__NR_setdomainname, sys_ni_syscall), // 162
|
||||
GENXY(__NR_getrlimit, sys_old_getrlimit), // 163
|
||||
GENX_(__NR_setrlimit, sys_setrlimit), // 164
|
||||
GENXY(__NR_getrusage, sys_getrusage), // 165
|
||||
GENX_(__NR_umask, sys_umask), // 166
|
||||
LINXY(__NR_prctl, sys_prctl), // 167
|
||||
-
|
||||
+ LINXY(__NR_getcpu, sys_getcpu), // 168
|
||||
GENXY(__NR_gettimeofday, sys_gettimeofday), // 169
|
||||
GENX_(__NR_settimeofday, sys_settimeofday), // 170
|
||||
LINXY(__NR_adjtimex, sys_adjtimex), // 171
|
||||
@@ -843,13 +846,14 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
GENXY(__NR_munmap, sys_munmap), // 215
|
||||
GENX_(__NR_mremap, sys_mremap), // 216
|
||||
LINX_(__NR_add_key, sys_add_key), // 217
|
||||
-
|
||||
+ LINX_(__NR_request_key, sys_request_key), // 218
|
||||
LINXY(__NR_keyctl, sys_keyctl), // 219
|
||||
LINX_(__NR_clone, sys_clone), // 220
|
||||
GENX_(__NR_execve, sys_execve), // 221
|
||||
PLAX_(__NR_mmap, sys_mmap), // 222
|
||||
PLAX_(__NR_fadvise64, sys_fadvise64), // 223
|
||||
-
|
||||
+ // (__NR_swapon, sys_swapon), // 224
|
||||
+ // (__NR_swapoff, sys_swapoff), // 225
|
||||
GENXY(__NR_mprotect, sys_mprotect), // 226
|
||||
GENX_(__NR_msync, sys_msync), // 227
|
||||
GENX_(__NR_mlock, sys_mlock), // 228
|
||||
@@ -858,301 +862,47 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_munlockall, sys_munlockall), // 231
|
||||
GENXY(__NR_mincore, sys_mincore), // 232
|
||||
GENX_(__NR_madvise, sys_madvise), // 233
|
||||
-
|
||||
+ // (__NR_remap_file_pages, sys_ni_syscall) // 234
|
||||
LINX_(__NR_mbind, sys_mbind), // 235
|
||||
LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 236
|
||||
LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 237
|
||||
-
|
||||
+ // (__NR_migrate_pages, sys_ni_syscall), // 238
|
||||
+ LINXY(__NR_move_pages, sys_move_pages), // 239
|
||||
+ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo), // 240
|
||||
LINXY(__NR_perf_event_open, sys_perf_event_open), // 241
|
||||
LINXY(__NR_accept4, sys_accept4), // 242
|
||||
LINXY(__NR_recvmmsg, sys_recvmmsg), // 243
|
||||
-
|
||||
GENXY(__NR_wait4, sys_wait4), // 260
|
||||
LINXY(__NR_prlimit64, sys_prlimit64), // 261
|
||||
-
|
||||
+ LINXY(__NR_fanotify_init, sys_fanotify_init), // 262
|
||||
+ LINX_(__NR_fanotify_mark, sys_fanotify_mark), // 263
|
||||
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at), // 264
|
||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at), // 265
|
||||
-
|
||||
+ LINXY(__NR_clock_adjtime, sys_clock_adjtime), // 266
|
||||
LINX_(__NR_syncfs, sys_syncfs), // 267
|
||||
-
|
||||
+ // (__NR_setns, sys_ni_syscall), // 268
|
||||
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
|
||||
-
|
||||
+ LINX_(__NR_kcmp, sys_kcmp), // 272
|
||||
+ // (__NR_finit_module, sys_ni_syscall), // 273
|
||||
+ // (__NR_sched_setattr, sys_ni_syscall), // 274
|
||||
+ // (__NR_sched_getattr, sys_ni_syscall), // 275
|
||||
LINX_(__NR_renameat2, sys_renameat2), // 276
|
||||
-
|
||||
+ // (__NR_seccomp, sys_ni_syscall), // 277
|
||||
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
|
||||
-// to be correct.
|
||||
-
|
||||
-//ZZ //zz // (restart_syscall) // 0
|
||||
-//ZZ GENX_(__NR_fork, sys_fork), // 2
|
||||
-//ZZ
|
||||
-//ZZ GENXY(__NR_open, sys_open), // 5
|
||||
-//ZZ // GENXY(__NR_waitpid, sys_waitpid), // 7
|
||||
-//ZZ GENXY(__NR_creat, sys_creat), // 8
|
||||
-//ZZ GENX_(__NR_link, sys_link), // 9
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_unlink, sys_unlink), // 10
|
||||
-//ZZ GENXY(__NR_time, sys_time), // 13
|
||||
-//ZZ GENX_(__NR_mknod, sys_mknod), // 14
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_chmod, sys_chmod), // 15
|
||||
-//ZZ //zz LINX_(__NR_lchown, sys_lchown16), // 16
|
||||
-//ZZ // GENX_(__NR_break, sys_ni_syscall), // 17
|
||||
-//ZZ //zz // (__NR_oldstat, sys_stat), // 18 (obsolete)
|
||||
-//ZZ LINX_(__NR_lseek, sys_lseek), // 19
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_getpid, sys_getpid), // 20
|
||||
-//ZZ LINX_(__NR_umount, sys_oldumount), // 22
|
||||
-//ZZ LINX_(__NR_setuid, sys_setuid16), // 23 ## P
|
||||
-//ZZ LINX_(__NR_getuid, sys_getuid16), // 24 ## P
|
||||
-//ZZ //zz
|
||||
-//ZZ //zz // (__NR_stime, sys_stime), // 25 * (SVr4,SVID,X/OPEN)
|
||||
-//ZZ PLAXY(__NR_ptrace, sys_ptrace), // 26
|
||||
-//ZZ GENX_(__NR_alarm, sys_alarm), // 27
|
||||
-//ZZ //zz // (__NR_oldfstat, sys_fstat), // 28 * L -- obsolete
|
||||
-//ZZ GENX_(__NR_pause, sys_pause), // 29
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_utime, sys_utime), // 30
|
||||
-//ZZ // GENX_(__NR_stty, sys_ni_syscall), // 31
|
||||
-//ZZ // GENX_(__NR_gtty, sys_ni_syscall), // 32
|
||||
-//ZZ GENX_(__NR_access, sys_access), // 33
|
||||
-//ZZ GENX_(__NR_nice, sys_nice), // 34
|
||||
-//ZZ
|
||||
-//ZZ // GENX_(__NR_ftime, sys_ni_syscall), // 35
|
||||
-//ZZ GENX_(__NR_rename, sys_rename), // 38
|
||||
-//ZZ GENX_(__NR_mkdir, sys_mkdir), // 39
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_rmdir, sys_rmdir), // 40
|
||||
-//ZZ LINXY(__NR_pipe, sys_pipe), // 42
|
||||
-//ZZ // GENX_(__NR_prof, sys_ni_syscall), // 44
|
||||
-
|
||||
-//ZZ LINX_(__NR_getgid, sys_getgid16), // 47
|
||||
-//ZZ //zz // (__NR_signal, sys_signal), // 48 */* (ANSI C)
|
||||
-//ZZ LINX_(__NR_geteuid, sys_geteuid16), // 49
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_getegid, sys_getegid16), // 50
|
||||
-//ZZ // GENX_(__NR_lock, sys_ni_syscall), // 53
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_fcntl, sys_fcntl), // 55
|
||||
-//ZZ // GENX_(__NR_mpx, sys_ni_syscall), // 56
|
||||
-//ZZ // GENX_(__NR_ulimit, sys_ni_syscall), // 58
|
||||
-//ZZ //zz // (__NR_oldolduname, sys_olduname), // 59 Linux -- obsolete
|
||||
-//ZZ //zz
|
||||
-//ZZ //zz // (__NR_ustat, sys_ustat) // 62 SVr4 -- deprecated
|
||||
-//ZZ GENXY(__NR_dup2, sys_dup2), // 63
|
||||
-//ZZ GENX_(__NR_getppid, sys_getppid), // 64
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_getpgrp, sys_getpgrp), // 65
|
||||
-//ZZ LINXY(__NR_sigaction, sys_sigaction), // 67
|
||||
-//ZZ //zz // (__NR_sgetmask, sys_sgetmask), // 68 */* (ANSI C)
|
||||
-//ZZ //zz // (__NR_ssetmask, sys_ssetmask), // 69 */* (ANSI C)
|
||||
-//ZZ //zz
|
||||
-//ZZ PLAX_(__NR_sigsuspend, sys_sigsuspend), // 72
|
||||
-//ZZ LINXY(__NR_sigpending, sys_sigpending), // 73
|
||||
-//ZZ //zz // (__NR_sethostname, sys_sethostname), // 74 */*
|
||||
-//ZZ //zz
|
||||
-//ZZ GENXY(__NR_getrlimit, sys_old_getrlimit), // 76
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_getgroups, sys_getgroups16), // 80
|
||||
-//ZZ LINX_(__NR_setgroups, sys_setgroups16), // 81
|
||||
-//ZZ // PLAX_(__NR_select, old_select), // 82
|
||||
-//ZZ GENX_(__NR_symlink, sys_symlink), // 83
|
||||
-//ZZ //zz // (__NR_oldlstat, sys_lstat), // 84 -- obsolete
|
||||
-//ZZ //zz
|
||||
-//ZZ GENX_(__NR_readlink, sys_readlink), // 85
|
||||
-//ZZ //zz // (__NR_uselib, sys_uselib), // 86 */Linux
|
||||
-//ZZ //zz // (__NR_swapon, sys_swapon), // 87 */Linux
|
||||
-//ZZ //zz // (__NR_reboot, sys_reboot), // 88 */Linux
|
||||
-//ZZ //zz // (__NR_readdir, old_readdir), // 89 -- superseded
|
||||
-//ZZ //zz
|
||||
-//ZZ // _____(__NR_mmap, old_mmap), // 90
|
||||
-//ZZ GENXY(__NR_munmap, sys_munmap), // 91
|
||||
-//ZZ GENX_(__NR_truncate, sys_truncate), // 92
|
||||
-//ZZ GENX_(__NR_ftruncate, sys_ftruncate), // 93
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_fchown, sys_fchown16), // 95
|
||||
-//ZZ // GENX_(__NR_profil, sys_ni_syscall), // 98
|
||||
-//ZZ GENXY(__NR_statfs, sys_statfs), // 99
|
||||
-//ZZ
|
||||
-//ZZ GENXY(__NR_fstatfs, sys_fstatfs), // 100
|
||||
-//ZZ // LINX_(__NR_ioperm, sys_ioperm), // 101
|
||||
-//ZZ LINXY(__NR_socketcall, sys_socketcall), // 102
|
||||
-//ZZ
|
||||
-//ZZ GENXY(__NR_stat, sys_newstat), // 106
|
||||
-//ZZ GENXY(__NR_lstat, sys_newlstat), // 107
|
||||
-//ZZ GENXY(__NR_fstat, sys_newfstat), // 108
|
||||
-//ZZ //zz // (__NR_olduname, sys_uname), // 109 -- obsolete
|
||||
-//ZZ //zz
|
||||
-//ZZ // GENX_(__NR_iopl, sys_iopl), // 110
|
||||
-//ZZ // GENX_(__NR_idle, sys_ni_syscall), // 112
|
||||
-//ZZ // PLAXY(__NR_vm86old, sys_vm86old), // 113 __NR_syscall... weird
|
||||
-//ZZ //zz
|
||||
-//ZZ //zz // (__NR_swapoff, sys_swapoff), // 115 */Linux
|
||||
-//ZZ // _____(__NR_ipc, sys_ipc), // 117
|
||||
-//ZZ GENX_(__NR_fsync, sys_fsync), // 118
|
||||
-//ZZ PLAX_(__NR_sigreturn, sys_sigreturn), // 119 ?/Linux
|
||||
-//ZZ
|
||||
-//ZZ //zz // (__NR_setdomainname, sys_setdomainname), // 121 */*(?)
|
||||
-//ZZ // PLAX_(__NR_modify_ldt, sys_modify_ldt), // 123
|
||||
-//ZZ //zz
|
||||
-//ZZ LINXY(__NR_sigprocmask, sys_sigprocmask), // 126
|
||||
-//ZZ //zz // Nb: create_module() was removed 2.4-->2.6
|
||||
-//ZZ // GENX_(__NR_create_module, sys_ni_syscall), // 127
|
||||
-//ZZ LINX_(__NR_delete_module, sys_delete_module), // 129
|
||||
-//ZZ //zz
|
||||
-//ZZ //zz // Nb: get_kernel_syms() was removed 2.4-->2.6
|
||||
-//ZZ // GENX_(__NR_get_kernel_syms, sys_ni_syscall), // 130
|
||||
-//ZZ GENX_(__NR_getpgid, sys_getpgid), // 132
|
||||
-//ZZ //zz // (__NR_bdflush, sys_bdflush), // 134 */Linux
|
||||
-//ZZ //zz
|
||||
-//ZZ //zz // (__NR_sysfs, sys_sysfs), // 135 SVr4
|
||||
-//ZZ // GENX_(__NR_afs_syscall, sys_ni_syscall), // 137
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR__llseek, sys_llseek), // 140
|
||||
-//ZZ GENXY(__NR_getdents, sys_getdents), // 141
|
||||
-//ZZ GENX_(__NR__newselect, sys_select), // 142
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR__sysctl, sys_sysctl), // 149
|
||||
-//ZZ
|
||||
-//ZZ //zz //LINX?(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161 */*
|
||||
-//ZZ LINX_(__NR_setresuid, sys_setresuid16), // 164
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_getresuid, sys_getresuid16), // 165
|
||||
-//ZZ // PLAXY(__NR_vm86, sys_vm86), // 166 x86/Linux-only
|
||||
-//ZZ // GENX_(__NR_query_module, sys_ni_syscall), // 167
|
||||
-//ZZ GENXY(__NR_poll, sys_poll), // 168
|
||||
-//ZZ //zz // (__NR_nfsservctl, sys_nfsservctl), // 169 */Linux
|
||||
-//ZZ //zz
|
||||
-//ZZ LINX_(__NR_setresgid, sys_setresgid16), // 170
|
||||
-//ZZ LINXY(__NR_getresgid, sys_getresgid16), // 171
|
||||
-//ZZ LINXY(__NR_prctl, sys_prctl), // 172
|
||||
-//ZZ LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 174
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait),// 177
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_chown, sys_chown16), // 182
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_sendfile, sys_sendfile), // 187
|
||||
-//ZZ // GENXY(__NR_getpmsg, sys_getpmsg), // 188
|
||||
-//ZZ // GENX_(__NR_putpmsg, sys_putpmsg), // 189
|
||||
-//ZZ
|
||||
-//ZZ // Nb: we treat vfork as fork
|
||||
-//ZZ GENX_(__NR_vfork, sys_fork), // 190
|
||||
-//ZZ GENXY(__NR_ugetrlimit, sys_getrlimit), // 191
|
||||
-//ZZ GENX_(__NR_truncate64, sys_truncate64), // 193
|
||||
-//ZZ GENX_(__NR_ftruncate64, sys_ftruncate64), // 194
|
||||
-//ZZ
|
||||
-//ZZ PLAXY(__NR_stat64, sys_stat64), // 195
|
||||
-//ZZ PLAXY(__NR_lstat64, sys_lstat64), // 196
|
||||
-//ZZ PLAXY(__NR_fstat64, sys_fstat64), // 197
|
||||
-//ZZ GENX_(__NR_lchown32, sys_lchown), // 198
|
||||
-//ZZ GENX_(__NR_getuid32, sys_getuid), // 199
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_getgid32, sys_getgid), // 200
|
||||
-//ZZ GENX_(__NR_geteuid32, sys_geteuid), // 201
|
||||
-//ZZ GENX_(__NR_getegid32, sys_getegid), // 202
|
||||
-//ZZ GENX_(__NR_setreuid32, sys_setreuid), // 203
|
||||
-//ZZ GENX_(__NR_setregid32, sys_setregid), // 204
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_setresuid32, sys_setresuid), // 208
|
||||
-//ZZ LINXY(__NR_getresuid32, sys_getresuid), // 209
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_setresgid32, sys_setresgid), // 210
|
||||
-//ZZ LINXY(__NR_getresgid32, sys_getresgid), // 211
|
||||
-//ZZ GENX_(__NR_chown32, sys_chown), // 212
|
||||
-//ZZ GENX_(__NR_setuid32, sys_setuid), // 213
|
||||
-//ZZ GENX_(__NR_setgid32, sys_setgid), // 214
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_setfsuid32, sys_setfsuid), // 215
|
||||
-//ZZ LINX_(__NR_setfsgid32, sys_setfsgid), // 216
|
||||
-//ZZ //zz // (__NR_pivot_root, sys_pivot_root), // 217 */Linux
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_fcntl64, sys_fcntl64), // 221
|
||||
-//ZZ // GENX_(222, sys_ni_syscall), // 222
|
||||
-//ZZ // PLAXY(223, sys_syscall223), // 223 // sys_bproc?
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_tkill, sys_tkill), // 238 */Linux
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_futex, sys_futex), // 240
|
||||
-//ZZ LINXY(__NR_sched_getaffinity, sys_sched_getaffinity), // 242
|
||||
-//ZZ // PLAX_(__NR_set_thread_area, sys_set_thread_area), // 243
|
||||
-//ZZ // PLAX_(__NR_get_thread_area, sys_get_thread_area), // 244
|
||||
-//ZZ
|
||||
-//ZZ // LINX_(__NR_fadvise64, sys_fadvise64), // 250 */(Linux?)
|
||||
-//ZZ GENX_(251, sys_ni_syscall), // 251
|
||||
-//ZZ LINXY(__NR_epoll_create, sys_epoll_create), // 254
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_epoll_ctl, sys_epoll_ctl), // 255
|
||||
-//ZZ LINXY(__NR_epoll_wait, sys_epoll_wait), // 256
|
||||
-//ZZ //zz // (__NR_remap_file_pages, sys_remap_file_pages), // 257 */Linux
|
||||
-//ZZ LINX_(__NR_set_tid_address, sys_set_tid_address), // 258
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_clock_getres, sys_clock_getres), // (timer_create+7)
|
||||
-//ZZ GENXY(__NR_statfs64, sys_statfs64), // 268
|
||||
-//ZZ GENXY(__NR_fstatfs64, sys_fstatfs64), // 269
|
||||
-//ZZ
|
||||
-//ZZ GENX_(__NR_utimes, sys_utimes), // 271
|
||||
-//ZZ // LINX_(__NR_fadvise64_64, sys_fadvise64_64), // 272 */(Linux?)
|
||||
-//ZZ GENX_(__NR_vserver, sys_ni_syscall), // 273
|
||||
-//ZZ LINX_(__NR_mbind, sys_mbind), // 274 ?/?
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_get_mempolicy, sys_get_mempolicy), // 275 ?/?
|
||||
-//ZZ LINX_(__NR_set_mempolicy, sys_set_mempolicy), // 276 ?/?
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_send, sys_send),
|
||||
-//ZZ LINXY(__NR_recv, sys_recv),
|
||||
-//ZZ LINXY(__NR_recvfrom, sys_recvfrom), // 292
|
||||
-//ZZ LINX_(__NR_semget, sys_semget), // 299
|
||||
-//ZZ LINXY(__NR_semctl, sys_semctl), // 300
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_request_key, sys_request_key), // 287
|
||||
-//ZZ LINX_(__NR_inotify_init, sys_inotify_init), // 291
|
||||
-//ZZ // LINX_(__NR_migrate_pages, sys_migrate_pages), // 294
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_futimesat, sys_futimesat), // 326 on arm
|
||||
-//ZZ
|
||||
-//ZZ PLAXY(__NR_fstatat64, sys_fstatat64), // 300
|
||||
-//ZZ LINX_(__NR_renameat, sys_renameat), // 302
|
||||
-//ZZ LINX_(__NR_symlinkat, sys_symlinkat), // 304
|
||||
-//ZZ
|
||||
-//ZZ LINX_(__NR_shmget, sys_shmget), //307
|
||||
-//ZZ // LINX_(__NR_pselect6, sys_pselect6), //
|
||||
-//ZZ
|
||||
-//ZZ // LINX_(__NR_unshare, sys_unshare), // 310
|
||||
-//ZZ LINX_(__NR_set_robust_list, sys_set_robust_list), // 311
|
||||
-//ZZ LINXY(__NR_get_robust_list, sys_get_robust_list), // 312
|
||||
-//ZZ // LINX_(__NR_sync_file_range, sys_sync_file_range), // 314
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_move_pages, sys_move_pages), // 317
|
||||
-//ZZ // LINX_(__NR_getcpu, sys_ni_syscall), // 318
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_signalfd, sys_signalfd), // 321
|
||||
-//ZZ LINXY(__NR_eventfd, sys_eventfd), // 323
|
||||
-//ZZ
|
||||
-//ZZ
|
||||
-//ZZ ///////////////
|
||||
-//ZZ
|
||||
-//ZZ // JRS 2010-Jan-03: I believe that all the numbers listed
|
||||
-//ZZ // in comments in the table prior to this point (eg "// 326",
|
||||
-//ZZ // etc) are bogus since it looks to me like they are copied
|
||||
-//ZZ // verbatim from syswrap-x86-linux.c and they certainly do not
|
||||
-//ZZ // correspond to what's in include/vki/vki-scnums-arm-linux.h.
|
||||
-//ZZ // From here onwards, please ensure the numbers are correct.
|
||||
-//ZZ
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 346
|
||||
-//ZZ
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_eventfd2, sys_eventfd2), // 356
|
||||
-//ZZ LINXY(__NR_epoll_create1, sys_epoll_create1), // 357
|
||||
-//ZZ LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 363
|
||||
-//ZZ
|
||||
-//ZZ LINXY(__NR_clock_adjtime, sys_clock_adjtime) // 372
|
||||
+ // (__NR_bpf, sys_ni_syscall) // 280
|
||||
+ // (__NR_execveat, sys_ni_syscall), // 281
|
||||
+ // (__NR_userfaultfd, sys_ni_syscall), // 282
|
||||
+ // (__NR_membarrier, sys_ni_syscall), // 283
|
||||
+ // (__NR_mlock2, sys_ni_syscall), // 284
|
||||
+ // (__NR_copy_file_range, sys_ni_syscall), // 285
|
||||
+ // (__NR_preadv2, sys_ni_syscall), // 286
|
||||
+ // (__NR_pwritev2, sys_ni_syscall), // 287
|
||||
+ // (__NR_pkey_mprotect, sys_ni_syscall), // 288
|
||||
+ // (__NR_pkey_alloc, sys_ni_syscall), // 289
|
||||
+ // (__NR_pkey_free, sys_ni_syscall), // 290
|
||||
};
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
commit cd685e0ff55060e9ec341c86b23c6dbb2d3127f4
|
||||
Author: tom <tom@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
|
||||
Date: Sat Feb 11 10:44:29 2017 +0000
|
||||
|
||||
Handle unknown HINT instructions on aarch64 by ignoring them. BZ#376279.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/vex/trunk@3302 8f6e269a-dfd6-0310-a8e1-e2731360e62c
|
||||
|
||||
diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c
|
||||
index e527447..484a26e 100644
|
||||
--- a/VEX/priv/guest_arm64_toIR.c
|
||||
+++ b/VEX/priv/guest_arm64_toIR.c
|
||||
@@ -7022,6 +7022,19 @@ Bool dis_ARM64_branch_etc(/*MB_OUT*/DisResult* dres, UInt insn,
|
||||
return True;
|
||||
}
|
||||
|
||||
+ /* -------------------- HINT ------------------- */
|
||||
+ /* 31 23 15 11 4 3
|
||||
+ 1101 0101 0000 0011 0010 imm7 1 1111
|
||||
+ */
|
||||
+ if (INSN(31,24) == BITS8(1,1,0,1,0,1,0,1)
|
||||
+ && INSN(23,16) == BITS8(0,0,0,0,0,0,1,1)
|
||||
+ && INSN(15,12) == BITS4(0,0,1,0)
|
||||
+ && INSN(4,0) == BITS5(1,1,1,1,1)) {
|
||||
+ UInt imm7 = INSN(11,5);
|
||||
+ DIP("hint #%u\n", imm7);
|
||||
+ return True;
|
||||
+ }
|
||||
+
|
||||
/* ------------------- CLREX ------------------ */
|
||||
/* 31 23 15 11 7
|
||||
1101 0101 0000 0011 0011 m 0101 1111 CLREX CRm
|
@ -1,24 +0,0 @@
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
index 1be6629..f8b5b7c 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
@@ -868,6 +868,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINXY(__NR_recvmmsg, sys_recvmmsg), // 243
|
||||
|
||||
GENXY(__NR_wait4, sys_wait4), // 260
|
||||
+ LINXY(__NR_prlimit64, sys_prlimit64), // 261
|
||||
|
||||
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at), // 264
|
||||
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at), // 265
|
||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
index f90140d..ce5cbbb 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
@@ -905,6 +905,7 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINX_(__NR_pwritev, sys_pwritev), // 321
|
||||
LINXY(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo),// 322
|
||||
|
||||
+ LINXY(__NR_prlimit64, sys_prlimit64), // 325
|
||||
LINXY(__NR_socket, sys_socket), // 326
|
||||
LINX_(__NR_bind, sys_bind), // 327
|
||||
LINX_(__NR_connect, sys_connect), // 328
|
@ -1,97 +0,0 @@
|
||||
commit 9e00f6ed1e84a3b251aded21ef98ed9e4adc6936
|
||||
Author: sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Wed Nov 23 13:15:22 2016 +0000
|
||||
|
||||
Bug 352767 - Wine/valgrind: Warning: noted but unhandled ioctl 0x5307
|
||||
with no size/direction hints. (CDROMSTOP).
|
||||
|
||||
Patch from Austin English (austinenglish@gmail.com).
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16152 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index fda8dd1..5e540e8 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -5672,6 +5672,7 @@ PRE(sys_ioctl)
|
||||
|
||||
/* CDROM stuff. */
|
||||
case VKI_CDROM_DISC_STATUS:
|
||||
+ case VKI_CDROMSTOP:
|
||||
|
||||
/* KVM ioctls that dont check for a numeric value as parameter */
|
||||
case VKI_KVM_S390_ENABLE_SIE:
|
||||
@@ -9188,6 +9189,7 @@ POST(sys_ioctl)
|
||||
|
||||
/* CD ROM stuff (??) */
|
||||
case VKI_CDROM_DISC_STATUS:
|
||||
+ case VKI_CDROMSTOP:
|
||||
break;
|
||||
case VKI_CDROMSUBCHNL:
|
||||
POST_MEM_WRITE(ARG3, sizeof(struct vki_cdrom_subchnl));
|
||||
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
|
||||
index bdb8f33..7f6a117 100644
|
||||
--- a/include/vki/vki-linux.h
|
||||
+++ b/include/vki/vki-linux.h
|
||||
@@ -1865,6 +1865,7 @@ struct vki_scsi_idlun {
|
||||
(struct cdrom_tochdr) */
|
||||
#define VKI_CDROMREADTOCENTRY 0x5306 /* Read TOC entry
|
||||
(struct cdrom_tocentry) */
|
||||
+#define VKI_CDROMSTOP 0x5307 /* Stop the cdrom drive */
|
||||
#define VKI_CDROMSUBCHNL 0x530b /* Read subchannel data
|
||||
(struct cdrom_subchnl) */
|
||||
#define VKI_CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes)
|
||||
|
||||
commit 88c8d843f64fcb56a0ddd492fb560e6594c3f2e6
|
||||
Author: sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Wed Nov 23 13:26:23 2016 +0000
|
||||
|
||||
Bug 348616 - Wine/valgrind: Warning: noted but unhandled ioctl 0x5390
|
||||
with no size/direction hints. (DVD_READ_STRUCT)
|
||||
|
||||
Patch from Austin English (austinenglish@gmail.com).
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16153 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index 5e540e8..af10b92 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -5674,7 +5674,10 @@ PRE(sys_ioctl)
|
||||
case VKI_CDROM_DISC_STATUS:
|
||||
case VKI_CDROMSTOP:
|
||||
|
||||
- /* KVM ioctls that dont check for a numeric value as parameter */
|
||||
+ /* DVD stuff */
|
||||
+ case VKI_DVD_READ_STRUCT:
|
||||
+
|
||||
+ /* KVM ioctls that don't check for a numeric value as parameter */
|
||||
case VKI_KVM_S390_ENABLE_SIE:
|
||||
case VKI_KVM_CREATE_IRQCHIP:
|
||||
case VKI_KVM_S390_INITIAL_RESET:
|
||||
@@ -9226,6 +9229,10 @@ POST(sys_ioctl)
|
||||
case VKI_CDROM_GET_CAPABILITY: /* 0x5331 */
|
||||
break;
|
||||
|
||||
+ /* DVD stuff */
|
||||
+ case VKI_DVD_READ_STRUCT:
|
||||
+ break;
|
||||
+
|
||||
case VKI_FIGETBSZ:
|
||||
POST_MEM_WRITE(ARG3, sizeof(unsigned long));
|
||||
break;
|
||||
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
|
||||
index 7f6a117..b64b521 100644
|
||||
--- a/include/vki/vki-linux.h
|
||||
+++ b/include/vki/vki-linux.h
|
||||
@@ -1885,6 +1885,7 @@ struct vki_scsi_idlun {
|
||||
#define VKI_CDROM_DISC_STATUS 0x5327 /* get CD type information */
|
||||
#define VKI_CDROM_GET_CAPABILITY 0x5331 /* get capabilities */
|
||||
|
||||
+#define VKI_DVD_READ_STRUCT 0x5390 /* read structure */
|
||||
#define VKI_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */
|
||||
|
||||
struct vki_cdrom_msf0
|
File diff suppressed because it is too large
Load Diff
@ -1,111 +0,0 @@
|
||||
commit 2b49317b4f237ea5f648d8b958f96cd03fcabc7d
|
||||
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Mon Nov 28 19:34:06 2016 +0000
|
||||
|
||||
Fix 373046 - Stacks registered by core are never deregistered
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16159 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
|
||||
index 0363898..49f51d6 100644
|
||||
--- a/coregrind/m_scheduler/scheduler.c
|
||||
+++ b/coregrind/m_scheduler/scheduler.c
|
||||
@@ -488,6 +488,7 @@ static void os_state_clear(ThreadState *tst)
|
||||
{
|
||||
tst->os_state.lwpid = 0;
|
||||
tst->os_state.threadgroup = 0;
|
||||
+ tst->os_state.stk_id = NULL_STK_ID;
|
||||
# if defined(VGO_linux)
|
||||
/* no other fields to clear */
|
||||
# elif defined(VGO_darwin)
|
||||
@@ -504,7 +505,6 @@ static void os_state_clear(ThreadState *tst)
|
||||
# if defined(VGP_x86_solaris)
|
||||
tst->os_state.thrptr = 0;
|
||||
# endif
|
||||
- tst->os_state.stk_id = (UWord)-1;
|
||||
tst->os_state.ustack = NULL;
|
||||
tst->os_state.in_door_return = False;
|
||||
tst->os_state.door_return_procedure = 0;
|
||||
diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c
|
||||
index 6ef6a90..28972ae 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-generic.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-generic.c
|
||||
@@ -84,11 +84,14 @@ void ML_(guess_and_register_stack) (Addr sp, ThreadState* tst)
|
||||
tst->client_stack_highest_byte = (Addr)VG_PGROUNDUP(sp)-1;
|
||||
tst->client_stack_szB = tst->client_stack_highest_byte - seg->start + 1;
|
||||
|
||||
- VG_(register_stack)(seg->start, tst->client_stack_highest_byte);
|
||||
+ tst->os_state.stk_id
|
||||
+ = VG_(register_stack)(seg->start, tst->client_stack_highest_byte);
|
||||
|
||||
if (debug)
|
||||
- VG_(printf)("tid %u: guessed client stack range [%#lx-%#lx]\n",
|
||||
- tst->tid, seg->start, tst->client_stack_highest_byte);
|
||||
+ VG_(printf)("tid %u: guessed client stack range [%#lx-%#lx]"
|
||||
+ " as stk_id %lu\n",
|
||||
+ tst->tid, seg->start, tst->client_stack_highest_byte,
|
||||
+ tst->os_state.stk_id);
|
||||
} else {
|
||||
VG_(message)(Vg_UserMsg,
|
||||
"!? New thread %u starts with SP(%#lx) unmapped\n",
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index af10b92..725ad78 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "pub_core_options.h"
|
||||
#include "pub_core_scheduler.h"
|
||||
#include "pub_core_signals.h"
|
||||
+#include "pub_core_stacks.h"
|
||||
#include "pub_core_syscall.h"
|
||||
#include "pub_core_syswrap.h"
|
||||
#include "pub_core_inner.h"
|
||||
@@ -162,6 +163,10 @@ static void run_a_thread_NORETURN ( Word tidW )
|
||||
c = VG_(count_living_threads)();
|
||||
vg_assert(c >= 1); /* stay sane */
|
||||
|
||||
+ /* Deregister thread's stack. */
|
||||
+ if (tst->os_state.stk_id != NULL_STK_ID)
|
||||
+ VG_(deregister_stack)(tst->os_state.stk_id);
|
||||
+
|
||||
// Tell the tool this thread is exiting
|
||||
VG_TRACK( pre_thread_ll_exit, tid );
|
||||
|
||||
diff --git a/coregrind/pub_core_threadstate.h b/coregrind/pub_core_threadstate.h
|
||||
index f3d956c..3307e75 100644
|
||||
--- a/coregrind/pub_core_threadstate.h
|
||||
+++ b/coregrind/pub_core_threadstate.h
|
||||
@@ -114,6 +114,8 @@ typedef
|
||||
ThreadArchState;
|
||||
|
||||
|
||||
+#define NULL_STK_ID (~(UWord)0)
|
||||
+
|
||||
/* OS-specific thread state. IMPORTANT: if you add fields to this,
|
||||
you _must_ add code to os_state_clear() to initialise those
|
||||
fields. */
|
||||
@@ -129,6 +131,12 @@ typedef
|
||||
Addr valgrind_stack_base; // Valgrind's stack (VgStack*)
|
||||
Addr valgrind_stack_init_SP; // starting value for SP
|
||||
|
||||
+ /* Client stack is registered as stk_id (on linux/darwin, by
|
||||
+ ML_(guess_and_register_stack)).
|
||||
+ Stack id NULL_STK_ID means that the user stack is not (yet)
|
||||
+ registered. */
|
||||
+ UWord stk_id;
|
||||
+
|
||||
/* exit details */
|
||||
Word exitcode; // in the case of exitgroup, set by someone else
|
||||
Int fatalsig; // fatal signal
|
||||
@@ -281,10 +289,6 @@ typedef
|
||||
the 64-bit offset associated with a %fs value of zero. */
|
||||
# endif
|
||||
|
||||
- /* Stack id (value (UWord)(-1) means that there is no stack). This
|
||||
- tracks a stack that is set in restore_stack(). */
|
||||
- UWord stk_id;
|
||||
-
|
||||
/* Simulation of the kernel's lwp->lwp_ustack. Set in the PRE wrapper
|
||||
of the getsetcontext syscall, for SETUSTACK. Used in
|
||||
VG_(save_context)(), VG_(restore_context)() and
|
@ -1,52 +0,0 @@
|
||||
commit 18b3ffc1a8dc951d8a8cdb076e7e30aafc216571
|
||||
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Sat Nov 19 14:54:44 2016 +0000
|
||||
|
||||
Fix 372504 Hanging on exit_group
|
||||
|
||||
Note that it is unclear if the PRE syscall for rt_sigsuspend
|
||||
is properly setting up a temporary mask in the thread state
|
||||
tmp_sig_mask: if an handler is called while a thread is
|
||||
calling sigsuspend, the mask during the handler run must be
|
||||
the temporary mask set by sigsuspend.
|
||||
It is not clear if/where the valgrind sigframe builder/handler
|
||||
sets the tmp_sig_mask to the value as expected by the user
|
||||
(i.e. the value of the temporary mask which was given to
|
||||
the sigsuspend syscall)
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16141 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index 1dcb95d..fda8dd1 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -3558,6 +3558,12 @@ PRE(sys_rt_sigsuspend)
|
||||
PRE_REG_READ2(int, "rt_sigsuspend", vki_sigset_t *, mask, vki_size_t, size)
|
||||
if (ARG1 != (Addr)NULL) {
|
||||
PRE_MEM_READ( "rt_sigsuspend(mask)", ARG1, sizeof(vki_sigset_t) );
|
||||
+ VG_(sigdelset)((vki_sigset_t*)ARG1, VG_SIGVGKILL);
|
||||
+ /* We cannot mask VG_SIGVGKILL, as otherwise this thread would not
|
||||
+ be killable by VG_(nuke_all_threads_except).
|
||||
+ We thus silently ignore the user request to mask this signal.
|
||||
+ Note that this is similar to what is done for e.g.
|
||||
+ sigprocmask (see m_signals.c calculate_SKSS_from_SCSS). */
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/coregrind/pub_core_threadstate.h b/coregrind/pub_core_threadstate.h
|
||||
index 861f233..f3d956c 100644
|
||||
--- a/coregrind/pub_core_threadstate.h
|
||||
+++ b/coregrind/pub_core_threadstate.h
|
||||
@@ -354,7 +354,9 @@ typedef struct {
|
||||
different values is during the execution of a sigsuspend, where
|
||||
tmp_sig_mask is the temporary mask which sigsuspend installs.
|
||||
It is only consulted to compute the signal mask applied to a
|
||||
- signal handler. */
|
||||
+ signal handler.
|
||||
+ PW Nov 2016 : it is not clear if and where this tmp_sig_mask
|
||||
+ is set when an handler runs "inside" a sigsuspend. */
|
||||
vki_sigset_t tmp_sig_mask;
|
||||
|
||||
/* A little signal queue for signals we can't get the kernel to
|
@ -1,47 +0,0 @@
|
||||
commit 4b00bfdd73a2cd56a4d9e8de0b249eed2a1b982f
|
||||
Author: petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Fri Feb 3 00:34:52 2017 +0000
|
||||
|
||||
add suppression for helgrind/tests/tc22_exit_w_lock
|
||||
|
||||
Function pthread_create indirectly calls function memcpy. Helgrind
|
||||
considers that memcpy is not thread safe function. For error reported
|
||||
from pthread_create there is the suppression helgrind---_dl_allocate_tls
|
||||
in the file glibc-2.34567-NPTL-helgrind.supp.
|
||||
Since glibc version 2.23, memcpy is implemented by __mempcpy_inline.
|
||||
This causes that call to memcpy from pthread_create is no longer
|
||||
recognized by the suppression.
|
||||
In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice,
|
||||
and second call reports error, which causes failing of the test.
|
||||
This patch adds suppression for glibc 2.23 and greater.
|
||||
|
||||
Patch by Tamara Vlahovic.
|
||||
|
||||
Related issue #375806.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16219 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/glibc-2.34567-NPTL-helgrind.supp b/glibc-2.34567-NPTL-helgrind.supp
|
||||
index ed105b8..7ebd2c4 100644
|
||||
--- a/glibc-2.34567-NPTL-helgrind.supp
|
||||
+++ b/glibc-2.34567-NPTL-helgrind.supp
|
||||
@@ -267,6 +267,18 @@
|
||||
fun:pthread_create@*
|
||||
}
|
||||
|
||||
+{
|
||||
+ helgrind---_dl_allocate_tls2
|
||||
+ Helgrind:Race
|
||||
+ fun:memcpy
|
||||
+ fun:__mempcpy_inline
|
||||
+ fun:_dl_allocate_tls_init
|
||||
+ ...
|
||||
+ fun:pthread_create@@GLIBC_2.2*
|
||||
+ fun:pthread_create_WRK
|
||||
+ fun:pthread_create@*
|
||||
+}
|
||||
+
|
||||
####################################################
|
||||
# To do with GNU libgomp
|
||||
#
|
@ -1,23 +0,0 @@
|
||||
commit b02baf74e6c14cc6fcf1e4fa94f1a6734c9cffbe
|
||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Sat Nov 12 19:51:51 2016 +0000
|
||||
|
||||
Cleanup none/tests/nocwd.vgtest tmp dirs.
|
||||
|
||||
The none/tests/nocwd creates a really deep temporary directory structure
|
||||
that is also inaccessible after the test. This causes issues with some
|
||||
build wrappers like koji which fail to cleanup such deep subdirectories.
|
||||
So explicitly cleanup the directory after the test.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1390282
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16134 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/none/tests/nocwd.vgtest b/none/tests/nocwd.vgtest
|
||||
index 74e2b4a..f8d4c3b 100644
|
||||
--- a/none/tests/nocwd.vgtest
|
||||
+++ b/none/tests/nocwd.vgtest
|
||||
@@ -1,2 +1,3 @@
|
||||
prog: nocwd
|
||||
vgopts: -q --trace-children=yes
|
||||
+cleanup: chmod u+rwx /tmp/wd_test_*; rm -rf /tmp/wd_test_*
|
@ -1,73 +0,0 @@
|
||||
commit 3f055b64899cc4b7c34f9ebdc4beb418a8bced07
|
||||
Author: carll <carll@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
|
||||
Date: Fri Mar 10 20:07:09 2017 +0000
|
||||
|
||||
PowerPC: Fix incorrect register pair check for lxv, stxv, stxsd, stxssp, lxsd,
|
||||
lxssp instructions
|
||||
|
||||
The lfdpx, stdpx, lfdp and stfdp instructions work on a register pair. The
|
||||
register pair test must only be applied to these instructions in the
|
||||
dis_fp_pair() function.
|
||||
|
||||
bugzilla 377427
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/vex/trunk@3308 8f6e269a-dfd6-0310-a8e1-e2731360e62c
|
||||
|
||||
diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
|
||||
index b19dcbc..0d27389 100644
|
||||
--- a/VEX/priv/guest_ppc_toIR.c
|
||||
+++ b/VEX/priv/guest_ppc_toIR.c
|
||||
@@ -11310,13 +11310,16 @@ static Bool dis_fp_pair ( UInt theInstr )
|
||||
UChar b0 = ifieldBIT0(theInstr);
|
||||
Bool is_load = 0;
|
||||
|
||||
- if ((frT_hi_addr %2) != 0) {
|
||||
- vex_printf("dis_fp_pair(ppc) : odd frT register\n");
|
||||
- return False;
|
||||
- }
|
||||
-
|
||||
switch (opc1) {
|
||||
case 0x1F: // register offset
|
||||
+ /* These instructions work on a pair of registers. The specified
|
||||
+ * register must be even.
|
||||
+ */
|
||||
+ if ((frT_hi_addr %2) != 0) {
|
||||
+ vex_printf("dis_fp_pair(ppc) ldpx or stdpx: odd frT register\n");
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
switch(opc2) {
|
||||
case 0x317: // lfdpx (FP Load Double Pair X-form, ISA 2.05 p125)
|
||||
DIP("ldpx fr%u,r%u,r%u\n", frT_hi_addr, rA_addr, rB_addr);
|
||||
@@ -11346,6 +11349,14 @@ static Bool dis_fp_pair ( UInt theInstr )
|
||||
|
||||
switch(opc2) {
|
||||
case 0x0: // lfdp (FP Load Double Pair DS-form, ISA 2.05 p125)
|
||||
+ /* This instruction works on a pair of registers. The specified
|
||||
+ * register must be even.
|
||||
+ */
|
||||
+ if ((frT_hi_addr %2) != 0) {
|
||||
+ vex_printf("dis_fp_pair(ppc) lfdp : odd frT register\n");
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
DIP("lfdp fr%u,%d(r%u)\n", frT_hi_addr, simm16, rA_addr);
|
||||
assign( EA_hi, ea_rAor0_simm( rA_addr, simm16 ) );
|
||||
is_load = 1;
|
||||
@@ -11390,6 +11401,14 @@ static Bool dis_fp_pair ( UInt theInstr )
|
||||
switch(opc2) {
|
||||
case 0x0:
|
||||
// stfdp (FP Store Double Pair DS-form, ISA 2.05 p125)
|
||||
+ /* This instruction works on a pair of registers. The specified
|
||||
+ * register must be even.
|
||||
+ */
|
||||
+ if ((frT_hi_addr %2) != 0) {
|
||||
+ vex_printf("dis_fp_pair(ppc) stfdp : odd frT register\n");
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
DIP("stfdp fr%u,%d(r%u)\n", frT_hi_addr, simm16, rA_addr);
|
||||
assign( EA_hi, ea_rAor0_simm( rA_addr, simm16 ) );
|
||||
break;
|
@ -1,505 +0,0 @@
|
||||
commit b8fbe1485567fb240404344533c16a82d53b868e
|
||||
Author: carll <carll@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
|
||||
Date: Mon Nov 7 19:41:30 2016 +0000
|
||||
|
||||
Fix xxsel parsing error.
|
||||
|
||||
The xxsel instruction uses part of the standard opc2 field to specify
|
||||
a additional operand or other values. A subset of the field is used for
|
||||
the actual opcode. The masking and array lookup was getting confused by
|
||||
bits in the the additional operand field. The arrays were split so only
|
||||
the opcodes that should be found for a given mask is in the array. This
|
||||
also speeds up the search as you are not searching through values that
|
||||
cannot match. The small groups of opcodes for a couple of the masks are
|
||||
now done in a case statement as that is probably faster then doing an array
|
||||
look up.
|
||||
|
||||
Bugzilla 148000
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/vex/trunk@3284 8f6e269a-dfd6-0310-a8e1-e2731360e62c
|
||||
|
||||
diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
|
||||
index c393740..c265645 100644
|
||||
--- a/VEX/priv/guest_ppc_toIR.c
|
||||
+++ b/VEX/priv/guest_ppc_toIR.c
|
||||
@@ -18146,7 +18146,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
assign( vB, getVSReg( XB ) );
|
||||
|
||||
switch (opc2) {
|
||||
- case 0x18C: case 0x38C: // xvcmpeqdp[.] (VSX Vector Compare Equal To Double-Precision [ & Record ])
|
||||
+ case 0x18C: // xvcmpeqdp[.] (VSX Vector Compare Equal To Double-Precision [ & Record ])
|
||||
{
|
||||
DIP("xvcmpeqdp%s crf%d,fr%u,fr%u\n", (flag_rC ? ".":""),
|
||||
XT, XA, XB);
|
||||
@@ -18154,7 +18154,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
break;
|
||||
}
|
||||
|
||||
- case 0x1CC: case 0x3CC: // xvcmpgedp[.] (VSX Vector Compare Greater Than or Equal To Double-Precision [ & Record ])
|
||||
+ case 0x1CC: // xvcmpgedp[.] (VSX Vector Compare Greater Than or Equal To Double-Precision [ & Record ])
|
||||
{
|
||||
DIP("xvcmpgedp%s crf%d,fr%u,fr%u\n", (flag_rC ? ".":""),
|
||||
XT, XA, XB);
|
||||
@@ -18162,7 +18162,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
break;
|
||||
}
|
||||
|
||||
- case 0x1AC: case 0x3AC: // xvcmpgtdp[.] (VSX Vector Compare Greater Than Double-Precision [ & Record ])
|
||||
+ case 0x1AC: // xvcmpgtdp[.] (VSX Vector Compare Greater Than Double-Precision [ & Record ])
|
||||
{
|
||||
DIP("xvcmpgtdp%s crf%d,fr%u,fr%u\n", (flag_rC ? ".":""),
|
||||
XT, XA, XB);
|
||||
@@ -18170,7 +18170,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
break;
|
||||
}
|
||||
|
||||
- case 0x10C: case 0x30C: // xvcmpeqsp[.] (VSX Vector Compare Equal To Single-Precision [ & Record ])
|
||||
+ case 0x10C: // xvcmpeqsp[.] (VSX Vector Compare Equal To Single-Precision [ & Record ])
|
||||
{
|
||||
IRTemp vD = newTemp(Ity_V128);
|
||||
|
||||
@@ -18184,7 +18184,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
break;
|
||||
}
|
||||
|
||||
- case 0x14C: case 0x34C: // xvcmpgesp[.] (VSX Vector Compare Greater Than or Equal To Single-Precision [ & Record ])
|
||||
+ case 0x14C: // xvcmpgesp[.] (VSX Vector Compare Greater Than or Equal To Single-Precision [ & Record ])
|
||||
{
|
||||
IRTemp vD = newTemp(Ity_V128);
|
||||
|
||||
@@ -18198,7 +18198,7 @@ dis_vvec_cmp( UInt theInstr, UInt opc2 )
|
||||
break;
|
||||
}
|
||||
|
||||
- case 0x12C: case 0x32C: //xvcmpgtsp[.] (VSX Vector Compare Greater Than Single-Precision [ & Record ])
|
||||
+ case 0x12C: //xvcmpgtsp[.] (VSX Vector Compare Greater Than Single-Precision [ & Record ])
|
||||
{
|
||||
IRTemp vD = newTemp(Ity_V128);
|
||||
|
||||
@@ -27043,17 +27043,93 @@ struct vsx_insn {
|
||||
};
|
||||
|
||||
// ATTENTION: Keep this array sorted on the opcocde!!!
|
||||
-static struct vsx_insn vsx_all[] = {
|
||||
- { 0x0, "xsaddsp" },
|
||||
- { 0x4, "xsmaddasp" },
|
||||
- { 0x8, "xxsldwi" },
|
||||
+static struct vsx_insn vsx_xx2[] = {
|
||||
{ 0x14, "xsrsqrtesp" },
|
||||
{ 0x16, "xssqrtsp" },
|
||||
{ 0x18, "xxsel" },
|
||||
+ { 0x34, "xsresp" },
|
||||
+ { 0x90, "xscvdpuxws" },
|
||||
+ { 0x92, "xsrdpi" },
|
||||
+ { 0x94, "xsrsqrtedp" },
|
||||
+ { 0x96, "xssqrtdp" },
|
||||
+ { 0xb0, "xscvdpsxws" },
|
||||
+ { 0xb2, "xsrdpiz" },
|
||||
+ { 0xb4, "xsredp" },
|
||||
+ { 0xd2, "xsrdpip" },
|
||||
+ { 0xd4, "xstsqrtdp" },
|
||||
+ { 0xd6, "xsrdpic" },
|
||||
+ { 0xf2, "xsrdpim" },
|
||||
+ { 0x112, "xvrspi" },
|
||||
+ { 0x116, "xvsqrtsp" },
|
||||
+ { 0x130, "xvcvspsxws" },
|
||||
+ { 0x132, "xvrspiz" },
|
||||
+ { 0x134, "xvresp" },
|
||||
+ { 0x148, "xxspltw" },
|
||||
+ { 0x14A, "xxextractuw" },
|
||||
+ { 0x150, "xvcvuxwsp" },
|
||||
+ { 0x152, "xvrspip" },
|
||||
+ { 0x154, "xvtsqrtsp" },
|
||||
+ { 0x156, "xvrspic" },
|
||||
+ { 0x16A, "xxinsertw" },
|
||||
+ { 0x170, "xvcvsxwsp" },
|
||||
+ { 0x172, "xvrspim" },
|
||||
+ { 0x190, "xvcvdpuxws" },
|
||||
+ { 0x192, "xvrdpi" },
|
||||
+ { 0x194, "xvrsqrtedp" },
|
||||
+ { 0x196, "xvsqrtdp" },
|
||||
+ { 0x1b0, "xvcvdpsxws" },
|
||||
+ { 0x1b2, "xvrdpiz" },
|
||||
+ { 0x1b4, "xvredp" },
|
||||
+ { 0x1d0, "xvcvuxwdp" },
|
||||
+ { 0x1d2, "xvrdpip" },
|
||||
+ { 0x1d4, "xvtsqrtdp" },
|
||||
+ { 0x1d6, "xvrdpic" },
|
||||
+ { 0x1f0, "xvcvsxwdp" },
|
||||
+ { 0x1f2, "xvrdpim" },
|
||||
+ { 0x212, "xscvdpsp" },
|
||||
+ { 0x216, "xscvdpspn" },
|
||||
+ { 0x232, "xxrsp" },
|
||||
+ { 0x250, "xscvuxdsp" },
|
||||
+ { 0x254, "xststdcsp" },
|
||||
+ { 0x270, "xscvsxdsp" },
|
||||
+ { 0x290, "xscvdpuxds" },
|
||||
+ { 0x292, "xscvspdp" },
|
||||
+ { 0x296, "xscvspdpn" },
|
||||
+ { 0x2b0, "xscvdpsxds" },
|
||||
+ { 0x2b2, "xsabsdp" },
|
||||
+ { 0x2b6, "xsxexpdp_xsxigdp" },
|
||||
+ { 0x2d0, "xscvuxddp" },
|
||||
+ { 0x2d2, "xsnabsdp" },
|
||||
+ { 0x2d4, "xststdcdp" },
|
||||
+ { 0x2e4, "xsnmsubmdp" },
|
||||
+ { 0x2f0, "xscvsxddp" },
|
||||
+ { 0x2f2, "xsnegdp" },
|
||||
+ { 0x310, "xvcvspuxds" },
|
||||
+ { 0x312, "xvcvdpsp" },
|
||||
+ { 0x330, "xvcvspsxds" },
|
||||
+ { 0x332, "xvabssp" },
|
||||
+ { 0x350, "xvcvuxdsp" },
|
||||
+ { 0x352, "xvnabssp" },
|
||||
+ { 0x370, "xvcvsxdsp" },
|
||||
+ { 0x372, "xvnegsp" },
|
||||
+ { 0x390, "xvcvdpuxds" },
|
||||
+ { 0x392, "xvcvspdp" },
|
||||
+ { 0x3b0, "xvcvdpsxds" },
|
||||
+ { 0x3b2, "xvabsdp" },
|
||||
+ { 0x3b6, "xxbr[h|w|d|q]|xvxexpdp|xvxexpsp|xvxsigdp|xvxsigsp|xvcvhpsp|xvcvsphp|xscvdphp|xscvhpdp" },
|
||||
+ { 0x3d0, "xvcvuxddp" },
|
||||
+ { 0x3d2, "xvnabsdp" },
|
||||
+ { 0x3f2, "xvnegdp" }
|
||||
+};
|
||||
+#define VSX_XX2_LEN (sizeof vsx_xx2 / sizeof *vsx_xx2)
|
||||
+
|
||||
+// ATTENTION: Keep this array sorted on the opcocde!!!
|
||||
+static struct vsx_insn vsx_xx3[] = {
|
||||
+ { 0x0, "xsaddsp" },
|
||||
+ { 0x4, "xsmaddasp" },
|
||||
+ { 0x9, "xsmaddmsp" },
|
||||
{ 0x20, "xssubsp" },
|
||||
{ 0x24, "xsmaddmsp" },
|
||||
- { 0x28, "xxpermdi" },
|
||||
- { 0x34, "xsresp" },
|
||||
{ 0x3A, "xxpermr" },
|
||||
{ 0x40, "xsmulsp" },
|
||||
{ 0x44, "xsmsubasp" },
|
||||
@@ -27064,174 +27140,112 @@ static struct vsx_insn vsx_all[] = {
|
||||
{ 0x80, "xsadddp" },
|
||||
{ 0x84, "xsmaddadp" },
|
||||
{ 0x8c, "xscmpudp" },
|
||||
- { 0x90, "xscvdpuxws" },
|
||||
- { 0x92, "xsrdpi" },
|
||||
- { 0x94, "xsrsqrtedp" },
|
||||
- { 0x96, "xssqrtdp" },
|
||||
{ 0xa0, "xssubdp" },
|
||||
{ 0xa4, "xsmaddmdp" },
|
||||
{ 0xac, "xscmpodp" },
|
||||
- { 0xb0, "xscvdpsxws" },
|
||||
- { 0xb2, "xsrdpiz" },
|
||||
- { 0xb4, "xsredp" },
|
||||
{ 0xc0, "xsmuldp" },
|
||||
{ 0xc4, "xsmsubadp" },
|
||||
{ 0xc8, "xxmrglw" },
|
||||
- { 0xd2, "xsrdpip" },
|
||||
{ 0xd4, "xstsqrtdp" },
|
||||
- { 0xd6, "xsrdpic" },
|
||||
{ 0xe0, "xsdivdp" },
|
||||
{ 0xe4, "xsmsubmdp" },
|
||||
{ 0xe8, "xxpermr" },
|
||||
{ 0xeC, "xscmpexpdp" },
|
||||
- { 0xf2, "xsrdpim" },
|
||||
{ 0xf4, "xstdivdp" },
|
||||
{ 0x100, "xvaddsp" },
|
||||
{ 0x104, "xvmaddasp" },
|
||||
- { 0x10c, "xvcmpeqsp" },
|
||||
+ { 0x10C, "xvcmpeqsp" },
|
||||
{ 0x110, "xvcvspuxws" },
|
||||
- { 0x112, "xvrspi" },
|
||||
{ 0x114, "xvrsqrtesp" },
|
||||
- { 0x116, "xvsqrtsp" },
|
||||
{ 0x120, "xvsubsp" },
|
||||
{ 0x124, "xvmaddmsp" },
|
||||
- { 0x12c, "xvcmpgtsp" },
|
||||
{ 0x130, "xvcvspsxws" },
|
||||
- { 0x132, "xvrspiz" },
|
||||
- { 0x134, "xvresp" },
|
||||
{ 0x140, "xvmulsp" },
|
||||
{ 0x144, "xvmsubasp" },
|
||||
- { 0x148, "xxspltw" },
|
||||
- { 0x14A, "xxextractuw" },
|
||||
- { 0x14c, "xvcmpgesp" },
|
||||
- { 0x150, "xvcvuxwsp" },
|
||||
- { 0x152, "xvrspip" },
|
||||
- { 0x154, "xvtsqrtsp" },
|
||||
- { 0x156, "xvrspic" },
|
||||
+ { 0x14C, "xvcmpgesp", },
|
||||
{ 0x160, "xvdivsp" },
|
||||
{ 0x164, "xvmsubmsp" },
|
||||
- { 0x16A, "xxinsertw" },
|
||||
- { 0x170, "xvcvsxwsp" },
|
||||
- { 0x172, "xvrspim" },
|
||||
{ 0x174, "xvtdivsp" },
|
||||
{ 0x180, "xvadddp" },
|
||||
{ 0x184, "xvmaddadp" },
|
||||
- { 0x18c, "xvcmpeqdp" },
|
||||
- { 0x190, "xvcvdpuxws" },
|
||||
- { 0x192, "xvrdpi" },
|
||||
- { 0x194, "xvrsqrtedp" },
|
||||
- { 0x196, "xvsqrtdp" },
|
||||
+ { 0x18C, "xvcmpeqdp" },
|
||||
{ 0x1a0, "xvsubdp" },
|
||||
{ 0x1a4, "xvmaddmdp" },
|
||||
- { 0x1ac, "xvcmpgtdp" },
|
||||
- { 0x1b0, "xvcvdpsxws" },
|
||||
- { 0x1b2, "xvrdpiz" },
|
||||
- { 0x1b4, "xvredp" },
|
||||
+ { 0x1aC, "xvcmpgtdp" },
|
||||
{ 0x1c0, "xvmuldp" },
|
||||
{ 0x1c4, "xvmsubadp" },
|
||||
{ 0x1cc, "xvcmpgedp" },
|
||||
- { 0x1d0, "xvcvuxwdp" },
|
||||
- { 0x1d2, "xvrdpip" },
|
||||
- { 0x1d4, "xvtsqrtdp" },
|
||||
- { 0x1d6, "xvrdpic" },
|
||||
{ 0x1e0, "xvdivdp" },
|
||||
{ 0x1e4, "xvmsubmdp" },
|
||||
- { 0x1f0, "xvcvsxwdp" },
|
||||
- { 0x1f2, "xvrdpim" },
|
||||
{ 0x1f4, "xvtdivdp" },
|
||||
{ 0x204, "xsnmaddasp" },
|
||||
{ 0x208, "xxland" },
|
||||
- { 0x212, "xscvdpsp" },
|
||||
- { 0x216, "xscvdpspn" },
|
||||
{ 0x224, "xsnmaddmsp" },
|
||||
{ 0x228, "xxlandc" },
|
||||
- { 0x232, "xxrsp" },
|
||||
{ 0x244, "xsnmsubasp" },
|
||||
{ 0x248, "xxlor" },
|
||||
- { 0x250, "xscvuxdsp" },
|
||||
- { 0x254, "xststdcsp" },
|
||||
{ 0x264, "xsnmsubmsp" },
|
||||
{ 0x268, "xxlxor" },
|
||||
- { 0x270, "xscvsxdsp" },
|
||||
{ 0x280, "xsmaxdp" },
|
||||
{ 0x284, "xsnmaddadp" },
|
||||
{ 0x288, "xxlnor" },
|
||||
- { 0x290, "xscvdpuxds" },
|
||||
- { 0x292, "xscvspdp" },
|
||||
- { 0x296, "xscvspdpn" },
|
||||
{ 0x2a0, "xsmindp" },
|
||||
{ 0x2a4, "xsnmaddmdp" },
|
||||
{ 0x2a8, "xxlorc" },
|
||||
- { 0x2b0, "xscvdpsxds" },
|
||||
- { 0x2b2, "xsabsdp" },
|
||||
- { 0x2b6, "xsxexpdp_xsxigdp" },
|
||||
{ 0x2c0, "xscpsgndp" },
|
||||
{ 0x2c4, "xsnmsubadp" },
|
||||
{ 0x2c8, "xxlnand" },
|
||||
- { 0x2d0, "xscvuxddp" },
|
||||
- { 0x2d2, "xsnabsdp" },
|
||||
- { 0x2d4, "xststdcdp" },
|
||||
{ 0x2e4, "xsnmsubmdp" },
|
||||
{ 0x2e8, "xxleqv" },
|
||||
- { 0x2f0, "xscvsxddp" },
|
||||
- { 0x2f2, "xsnegdp" },
|
||||
{ 0x300, "xvmaxsp" },
|
||||
{ 0x304, "xvnmaddasp" },
|
||||
- { 0x30c, "xvcmpeqsp." },
|
||||
- { 0x310, "xvcvspuxds" },
|
||||
- { 0x312, "xvcvdpsp" },
|
||||
{ 0x320, "xvminsp" },
|
||||
{ 0x324, "xvnmaddmsp" },
|
||||
- { 0x32c, "xvcmpgtsp." },
|
||||
- { 0x330, "xvcvspsxds" },
|
||||
- { 0x332, "xvabssp" },
|
||||
{ 0x340, "xvcpsgnsp" },
|
||||
{ 0x344, "xvnmsubasp" },
|
||||
- { 0x34c, "xvcmpgesp." },
|
||||
- { 0x350, "xvcvuxdsp" },
|
||||
- { 0x352, "xvnabssp" },
|
||||
- { 0x354, "xvtstdcsp" },
|
||||
{ 0x360, "xviexpsp" },
|
||||
{ 0x364, "xvnmsubmsp" },
|
||||
- { 0x370, "xvcvsxdsp" },
|
||||
- { 0x372, "xvnegsp" },
|
||||
{ 0x380, "xvmaxdp" },
|
||||
{ 0x384, "xvnmaddadp" },
|
||||
- { 0x38c, "xvcmpeqdp." },
|
||||
- { 0x390, "xvcvdpuxds" },
|
||||
- { 0x392, "xvcvspdp" },
|
||||
- { 0x396, "xsiexpdp" },
|
||||
{ 0x3a0, "xvmindp" },
|
||||
{ 0x3a4, "xvnmaddmdp" },
|
||||
- { 0x3ac, "xvcmpgtdp." },
|
||||
- { 0x3b0, "xvcvdpsxds" },
|
||||
- { 0x3b2, "xvabsdp" },
|
||||
- { 0x3b6, "xxbr[h|w|d|q]|xvxexpdp|xvxexpsp|xvxsigdp|xvxsigsp|xvcvhpsp|xvcvsphp|xscvdphp|xscvhpdp" },
|
||||
{ 0x3c0, "xvcpsgndp" },
|
||||
{ 0x3c4, "xvnmsubadp" },
|
||||
- { 0x3cc, "xvcmpgedp." },
|
||||
- { 0x3d0, "xvcvuxddp" },
|
||||
- { 0x3d2, "xvnabsdp" },
|
||||
- { 0x3d4, "xvtstdcdp" },
|
||||
{ 0x3e0, "xviexpdp" },
|
||||
{ 0x3e4, "xvnmsubmdp" },
|
||||
{ 0x3f0, "xvcvsxddp" },
|
||||
- { 0x3f2, "xvnegdp" }
|
||||
};
|
||||
-#define VSX_ALL_LEN (sizeof vsx_all / sizeof *vsx_all)
|
||||
+#define VSX_XX3_LEN (sizeof vsx_xx3 / sizeof *vsx_xx3)
|
||||
|
||||
|
||||
-// ATTENTION: This search function assumes vsx_all array is sorted.
|
||||
-static Int findVSXextOpCode(UInt opcode)
|
||||
+// ATTENTION: This search functions assumes vsx_all array is sorted.
|
||||
+static Int findVSXextOpCode_xx2(UInt opcode)
|
||||
{
|
||||
Int low, mid, high;
|
||||
low = 0;
|
||||
- high = VSX_ALL_LEN - 1;
|
||||
+ high = VSX_XX2_LEN - 1;
|
||||
while (low <= high) {
|
||||
mid = (low + high)/2;
|
||||
- if (opcode < vsx_all[mid].opcode)
|
||||
+ if (opcode < vsx_xx2[mid].opcode)
|
||||
high = mid - 1;
|
||||
- else if (opcode > vsx_all[mid].opcode)
|
||||
+ else if (opcode > vsx_xx2[mid].opcode)
|
||||
+ low = mid + 1;
|
||||
+ else
|
||||
+ return mid;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+static Int findVSXextOpCode_xx3(UInt opcode)
|
||||
+{
|
||||
+ Int low, mid, high;
|
||||
+ low = 0;
|
||||
+ high = VSX_XX3_LEN - 1;
|
||||
+ while (low <= high) {
|
||||
+ mid = (low + high)/2;
|
||||
+ if (opcode < vsx_xx3[mid].opcode)
|
||||
+ high = mid - 1;
|
||||
+ else if (opcode > vsx_xx3[mid].opcode)
|
||||
low = mid + 1;
|
||||
else
|
||||
return mid;
|
||||
@@ -27244,31 +27258,68 @@ static Int findVSXextOpCode(UInt opcode)
|
||||
* passed, and we then try to match it up with one of the VSX forms
|
||||
* below.
|
||||
*/
|
||||
-static UInt get_VSX60_opc2(UInt opc2_full)
|
||||
+static UInt get_VSX60_opc2(UInt opc2_full, UInt theInstr)
|
||||
{
|
||||
-#define XX2_MASK 0x000003FE
|
||||
+#define XX2_1_MASK 0x000003FF // xsiexpdp specific
|
||||
+#define XX2_2_MASK 0x000003FE
|
||||
#define XX3_1_MASK 0x000003FC
|
||||
#define XX3_2_MASK 0x000001FC
|
||||
-#define XX3_3_MASK 0x0000007C
|
||||
-#define XX4_MASK 0x00000018
|
||||
-#define VDCMX_MASK 0x000003B8
|
||||
+#define XX3_4_MASK 0x0000027C
|
||||
+#define XX3_5_MASK 0x000003DC
|
||||
+#define XX4_MASK 0x00000018
|
||||
+
|
||||
Int ret;
|
||||
UInt vsxExtOpcode = 0;
|
||||
|
||||
- if (( ret = findVSXextOpCode(opc2_full & XX2_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
- else if (( ret = findVSXextOpCode(opc2_full & XX3_1_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
- else if (( ret = findVSXextOpCode(opc2_full & VDCMX_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
- else if (( ret = findVSXextOpCode(opc2_full & XX3_2_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
- else if (( ret = findVSXextOpCode(opc2_full & XX3_3_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
- else if (( ret = findVSXextOpCode(opc2_full & XX4_MASK)) >= 0)
|
||||
- vsxExtOpcode = vsx_all[ret].opcode;
|
||||
+ if (( ret = findVSXextOpCode_xx2(opc2_full & XX2_2_MASK)) >= 0)
|
||||
+ return vsx_xx2[ret].opcode;
|
||||
+ else if ((opc2_full & XX2_1_MASK) == 0x396 ) // xsiexpdp
|
||||
+ return 0x396;
|
||||
+ else if (( ret = findVSXextOpCode_xx3(opc2_full & XX3_1_MASK)) >= 0)
|
||||
+ return vsx_xx3[ret].opcode;
|
||||
+ else {
|
||||
+
|
||||
+ /* There are only a few codes in each of these cases it is
|
||||
+ * probably faster to check for the codes then do the array lookups.
|
||||
+ */
|
||||
+ vsxExtOpcode = opc2_full & XX3_2_MASK;
|
||||
+
|
||||
+ switch (vsxExtOpcode) {
|
||||
+ case 0x10C: return vsxExtOpcode; // xvcmpeqsp
|
||||
+ case 0x12C: return vsxExtOpcode; // xvcmpgtsp, xvcmpgtsp.
|
||||
+ case 0x14C: return vsxExtOpcode; // xvcmpgesp, xvcmpgesp.
|
||||
+ case 0x18C: return vsxExtOpcode; // xvcmpeqdp, xvcmpeqdp.
|
||||
+ case 0x1AC: return vsxExtOpcode; // xvcmpgtdp, xvcmpgtdp.
|
||||
+ case 0x1CC: return vsxExtOpcode; // xvcmpgedp, xvcmpgedp.
|
||||
+ default: break;
|
||||
+ }
|
||||
|
||||
- return vsxExtOpcode;
|
||||
+ vsxExtOpcode = opc2_full & XX3_4_MASK;
|
||||
+
|
||||
+ switch (vsxExtOpcode) {
|
||||
+ case 0x8: return vsxExtOpcode; // xxsldwi
|
||||
+ case 0x28: return vsxExtOpcode; // xxpermdi
|
||||
+ default: break;
|
||||
+ }
|
||||
+
|
||||
+ vsxExtOpcode = opc2_full & XX3_5_MASK;
|
||||
+
|
||||
+ switch (vsxExtOpcode) {
|
||||
+ case 0x354: return vsxExtOpcode; // xvtstdcsp
|
||||
+ case 0x3D4: return vsxExtOpcode; // xvtstdcdp
|
||||
+ default: break;
|
||||
+ }
|
||||
+
|
||||
+ if (( opc2_full & XX4_MASK ) == XX4_MASK ) { // xxsel
|
||||
+ vsxExtOpcode = 0x18;
|
||||
+ return vsxExtOpcode;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ vex_printf( "Error: undefined opcode 0x %x, the instruction = 0x %x\n",
|
||||
+ opc2_full, theInstr );
|
||||
+ vpanic( "ERROR: get_VSX60_opc2()\n" );
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------*/
|
||||
@@ -27718,7 +27769,7 @@ DisResult disInstr_PPC_WRK (
|
||||
opc2 = ifieldOPClo10(theInstr);
|
||||
UInt opc2hi = IFIELD(theInstr, 7, 4);
|
||||
UInt opc2lo = IFIELD(theInstr, 3, 3);
|
||||
- UInt vsxOpc2 = get_VSX60_opc2(opc2);
|
||||
+ UInt vsxOpc2;
|
||||
|
||||
if (( opc2hi == 13 ) && ( opc2lo == 5)) { //xvtstdcsp
|
||||
if (dis_vxs_misc(theInstr, 0x354, allow_isa_3_0))
|
||||
@@ -27747,6 +27798,8 @@ DisResult disInstr_PPC_WRK (
|
||||
goto decode_failure;
|
||||
}
|
||||
|
||||
+ vsxOpc2 = get_VSX60_opc2(opc2, theInstr);
|
||||
+
|
||||
switch (vsxOpc2) {
|
||||
case 0x8: case 0x28: case 0x48: case 0xc8: // xxsldwi, xxpermdi, xxmrghw, xxmrglw
|
||||
case 0x068: case 0xE8: // xxperm, xxpermr
|
||||
@@ -27851,12 +27904,12 @@ DisResult disInstr_PPC_WRK (
|
||||
if (dis_vx_conv(theInstr, vsxOpc2)) goto decode_success;
|
||||
goto decode_failure;
|
||||
|
||||
- case 0x18C: case 0x38C: // xvcmpeqdp[.]
|
||||
- case 0x10C: case 0x30C: // xvcmpeqsp[.]
|
||||
- case 0x14C: case 0x34C: // xvcmpgesp[.]
|
||||
- case 0x12C: case 0x32C: // xvcmpgtsp[.]
|
||||
- case 0x1CC: case 0x3CC: // xvcmpgedp[.]
|
||||
- case 0x1AC: case 0x3AC: // xvcmpgtdp[.]
|
||||
+ case 0x18C: // xvcmpeqdp[.]
|
||||
+ case 0x10C: // xvcmpeqsp[.]
|
||||
+ case 0x14C: // xvcmpgesp[.]
|
||||
+ case 0x12C: // xvcmpgtsp[.]
|
||||
+ case 0x1CC: // xvcmpgedp[.]
|
||||
+ case 0x1AC: // xvcmpgtdp[.]
|
||||
if (dis_vvec_cmp(theInstr, vsxOpc2)) goto decode_success;
|
||||
goto decode_failure;
|
||||
|
@ -1,54 +0,0 @@
|
||||
PPC64: ISA 3.0 setup fixes.
|
||||
|
||||
There is a typo in the configure.ac file that causes the HAS_ISA_3_00
|
||||
variable to not be set.
|
||||
|
||||
The mask64 value is missing the HWCAPS bit for ISA3.0.
|
||||
bugzilla
|
||||
---
|
||||
VEX/priv/guest_ppc_toIR.c | 2 +-
|
||||
configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c
|
||||
index 0d27389..6fede61 100644
|
||||
--- a/VEX/priv/guest_ppc_toIR.c
|
||||
+++ b/VEX/priv/guest_ppc_toIR.c
|
||||
@@ -29122,7 +29122,7 @@ DisResult disInstr_PPC ( IRSB* irsb_IN,
|
||||
|
||||
mask64 = VEX_HWCAPS_PPC64_V | VEX_HWCAPS_PPC64_FX
|
||||
| VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP
|
||||
- | VEX_HWCAPS_PPC64_ISA2_07;
|
||||
+ | VEX_HWCAPS_PPC64_ISA2_07 | VEX_HWCAPS_PPC64_ISA3_0;
|
||||
|
||||
if (mode64) {
|
||||
vassert((hwcaps_guest & mask32) == 0);
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 587917b..4c3cc58 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1537,7 +1537,7 @@ ac_asm_have_isa_3_00=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
-AM_CONDITIONAL(HAS_ISA_3_00, test x$ac_asm_have_isa_3_00 = xyes \
|
||||
+AM_CONDITIONAL(HAS_ISA_3_00, [test x$ac_asm_have_isa_3_00 = xyes \
|
||||
-a x$HWCAP_HAS_ISA_3_00 = xyes])
|
||||
|
||||
# Check for pthread_create@GLIBC2.0
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Only in valgrind-3.12.0: autom4te.cache
|
||||
diff -ur valgrind-3.12.0.orig/configure valgrind-3.12.0/configure
|
||||
--- valgrind-3.12.0.orig/configure 2016-12-16 16:52:17.101832444 +0100
|
||||
+++ valgrind-3.12.0/configure 2017-03-28 23:38:32.997776458 +0200
|
||||
@@ -8122,7 +8122,7 @@
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
if test x$ac_asm_have_isa_3_00 = xyes \
|
||||
- -a x$HWCAP_HAS_ISA_3_00 = xyes]; then
|
||||
+ -a x$HWCAP_HAS_ISA_3_00 = xyes; then
|
||||
HAS_ISA_3_00_TRUE=
|
||||
HAS_ISA_3_00_FALSE='#'
|
||||
else
|
@ -1,52 +0,0 @@
|
||||
|
||||
On ppc64*, R2 is the TOC pointer, should not be considered a
|
||||
scratch register, and thus should not be in the clobber list.
|
||||
This is called out in newer GCC releases and triggers a
|
||||
compile time error.
|
||||
|
||||
Thusly, remove R2 from the clobber list.
|
||||
|
||||
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
|
||||
index dc6e26d..be77680 100644
|
||||
--- a/coregrind/m_debuglog.c
|
||||
+++ b/coregrind/m_debuglog.c
|
||||
@@ -215,7 +215,7 @@ static UInt local_sys_write_stderr ( const HChar* buf, Int n )
|
||||
:
|
||||
: "b" (block)
|
||||
: "cc","memory","cr0","ctr",
|
||||
- "r0","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
|
||||
+ "r0","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
|
||||
);
|
||||
if (block[0] < 0)
|
||||
block[0] = -1;
|
||||
@@ -231,7 +231,7 @@ static UInt local_sys_getpid ( void )
|
||||
: "=&r" (__res)
|
||||
: "i" (__NR_getpid)
|
||||
: "cc","memory","cr0","ctr",
|
||||
- "r0","r2","r4","r5","r6","r7","r8","r9","r10","r11","r12"
|
||||
+ "r0","r4","r5","r6","r7","r8","r9","r10","r11","r12"
|
||||
);
|
||||
return (UInt)__res;
|
||||
}
|
||||
diff --git a/include/valgrind.h b/include/valgrind.h
|
||||
index 6892007..d2e7c38 100644
|
||||
--- a/include/valgrind.h
|
||||
+++ b/include/valgrind.h
|
||||
@@ -2708,7 +2708,7 @@ typedef
|
||||
#define __CALLER_SAVED_REGS \
|
||||
"lr", "ctr", "xer", \
|
||||
"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
|
||||
- "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
|
||||
+ "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
|
||||
"r11", "r12", "r13"
|
||||
|
||||
/* Macros to save and align the stack before making a function
|
||||
@@ -3264,7 +3264,7 @@ typedef
|
||||
#define __CALLER_SAVED_REGS \
|
||||
"lr", "ctr", "xer", \
|
||||
"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
|
||||
- "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
|
||||
+ "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
|
||||
"r11", "r12", "r13"
|
||||
|
||||
/* Macros to save and align the stack before making a function
|
@ -1,103 +0,0 @@
|
||||
commit eee2c95b91b2fdcb36c0b1a2ab15df4a44ee2986
|
||||
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Sat Nov 19 13:51:41 2016 +0000
|
||||
|
||||
Fix Bug 372600 - process loops forever when fatal signals are arriving quickly
|
||||
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16140 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c
|
||||
index 168b681..b398882 100644
|
||||
--- a/coregrind/m_signals.c
|
||||
+++ b/coregrind/m_signals.c
|
||||
@@ -2430,8 +2430,14 @@ void async_signalhandler ( Int sigNo,
|
||||
info->si_code = sanitize_si_code(info->si_code);
|
||||
|
||||
if (VG_(clo_trace_signals))
|
||||
- VG_(dmsg)("async signal handler: signal=%d, tid=%u, si_code=%d\n",
|
||||
- sigNo, tid, info->si_code);
|
||||
+ VG_(dmsg)("async signal handler: signal=%d, tid=%u, si_code=%d, "
|
||||
+ "exitreason %s\n",
|
||||
+ sigNo, tid, info->si_code,
|
||||
+ VG_(name_of_VgSchedReturnCode)(tst->exitreason));
|
||||
+
|
||||
+ /* */
|
||||
+ if (tst->exitreason == VgSrc_FatalSig)
|
||||
+ resume_scheduler(tid);
|
||||
|
||||
/* Update thread state properly. The signal can only have been
|
||||
delivered whilst we were in
|
||||
@@ -2479,8 +2485,16 @@ void async_signalhandler ( Int sigNo,
|
||||
);
|
||||
|
||||
/* (2) */
|
||||
- /* Set up the thread's state to deliver a signal */
|
||||
- if (!is_sig_ign(info, tid))
|
||||
+ /* Set up the thread's state to deliver a signal.
|
||||
+ However, if exitreason is VgSrc_FatalSig, then thread tid was
|
||||
+ taken out of a syscall by VG_(nuke_all_threads_except).
|
||||
+ But after the emission of VKI_SIGKILL, another (fatal) async
|
||||
+ signal might be sent. In such a case, we must not handle this
|
||||
+ signal, as the thread is supposed to die first.
|
||||
+ => resume the scheduler for such a thread, so that the scheduler
|
||||
+ can let the thread die. */
|
||||
+ if (tst->exitreason != VgSrc_FatalSig
|
||||
+ && !is_sig_ign(info, tid))
|
||||
deliver_signal(tid, info, uc);
|
||||
|
||||
/* It's crucial that (1) and (2) happen in the order (1) then (2)
|
||||
@@ -2946,6 +2960,20 @@ void VG_(poll_signals)(ThreadId tid)
|
||||
ThreadState *tst = VG_(get_ThreadState)(tid);
|
||||
vki_sigset_t saved_mask;
|
||||
|
||||
+ if (tst->exitreason == VgSrc_FatalSig) {
|
||||
+ /* This task has been requested to die due to a fatal signal
|
||||
+ received by the process. So, we cannot poll new signals,
|
||||
+ as we are supposed to die asap. If we would poll and deliver
|
||||
+ a new (maybe fatal) signal, this could cause a deadlock, as
|
||||
+ this thread would believe it has to terminate the other threads
|
||||
+ and wait for them to die, while we already have a thread doing
|
||||
+ that. */
|
||||
+ if (VG_(clo_trace_signals))
|
||||
+ VG_(dmsg)("poll_signals: not polling as thread %u is exitreason %s\n",
|
||||
+ tid, VG_(name_of_VgSchedReturnCode)(tst->exitreason));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* look for all the signals this thread isn't blocking */
|
||||
/* pollset = ~tst->sig_mask */
|
||||
VG_(sigcomplementset)( &pollset, &tst->sig_mask );
|
||||
@@ -2961,15 +2989,18 @@ void VG_(poll_signals)(ThreadId tid)
|
||||
/* If there was nothing queued, ask the kernel for a pending signal */
|
||||
if (sip == NULL && VG_(sigtimedwait_zero)(&pollset, &si) > 0) {
|
||||
if (VG_(clo_trace_signals))
|
||||
- VG_(dmsg)("poll_signals: got signal %d for thread %u\n",
|
||||
- si.si_signo, tid);
|
||||
+ VG_(dmsg)("poll_signals: got signal %d for thread %u exitreason %s\n",
|
||||
+ si.si_signo, tid,
|
||||
+ VG_(name_of_VgSchedReturnCode)(tst->exitreason));
|
||||
sip = &si;
|
||||
}
|
||||
|
||||
if (sip != NULL) {
|
||||
/* OK, something to do; deliver it */
|
||||
if (VG_(clo_trace_signals))
|
||||
- VG_(dmsg)("Polling found signal %d for tid %u\n", sip->si_signo, tid);
|
||||
+ VG_(dmsg)("Polling found signal %d for tid %u exitreason %s\n",
|
||||
+ sip->si_signo, tid,
|
||||
+ VG_(name_of_VgSchedReturnCode)(tst->exitreason));
|
||||
if (!is_sig_ign(sip, tid))
|
||||
deliver_signal(tid, sip, NULL);
|
||||
else if (VG_(clo_trace_signals))
|
||||
@@ -3073,7 +3104,8 @@ void VG_(sigstartup_actions) ( void )
|
||||
}
|
||||
|
||||
if (VG_(clo_trace_signals))
|
||||
- VG_(dmsg)("Max kernel-supported signal is %d\n", VG_(max_signal));
|
||||
+ VG_(dmsg)("Max kernel-supported signal is %d, VG_SIGVGKILL is %d\n",
|
||||
+ VG_(max_signal), VG_SIGVGKILL);
|
||||
|
||||
/* Our private internal signals are treated as ignored */
|
||||
scss.scss_per_sig[VG_SIGVGKILL].scss_handler = VKI_SIG_IGN;
|
@ -1,190 +0,0 @@
|
||||
commit 88cf06207b074f387c04de4938a0bb20366616b0
|
||||
Author: mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Fri Oct 21 00:02:10 2016 +0000
|
||||
|
||||
Add libc_test to workaround pth_cond_destroy_busy test hangs.
|
||||
|
||||
This is a workaround for bug #371396. It adds a new test program
|
||||
that can be used skip tests given a specific libc implementation
|
||||
and optionally a specific minimum version. Currently only glibc
|
||||
is recognized. This is used for the drd and helgrind tests
|
||||
pth_cond_destroy_busy to be skipped on glibc 2.24.90+.
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16097 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/drd/tests/pth_cond_destroy_busy.vgtest b/drd/tests/pth_cond_destroy_busy.vgtest
|
||||
index eafbd74..f3cf778 100644
|
||||
--- a/drd/tests/pth_cond_destroy_busy.vgtest
|
||||
+++ b/drd/tests/pth_cond_destroy_busy.vgtest
|
||||
@@ -1,2 +1,2 @@
|
||||
-prereq: ./supported_libpthread
|
||||
+prereq: ./supported_libpthread && ! ../../tests/libc_test glibc 2.24.90
|
||||
prog: pth_cond_destroy_busy
|
||||
diff --git a/helgrind/tests/pth_cond_destroy_busy.vgtest b/helgrind/tests/pth_cond_destroy_busy.vgtest
|
||||
index 45d7853..2957cc3 100644
|
||||
--- a/helgrind/tests/pth_cond_destroy_busy.vgtest
|
||||
+++ b/helgrind/tests/pth_cond_destroy_busy.vgtest
|
||||
@@ -1,2 +1,2 @@
|
||||
-prereq: ! ../../tests/os_test darwin
|
||||
+prereq: ! ../../tests/os_test darwin && ! ../../tests/libc_test glibc 2.24.90
|
||||
prog: ../../drd/tests/pth_cond_destroy_busy
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 9c0cc3a..7233626 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -44,6 +44,7 @@ noinst_HEADERS = \
|
||||
check_PROGRAMS = \
|
||||
arch_test \
|
||||
os_test \
|
||||
+ libc_test \
|
||||
true \
|
||||
x86_amd64_features \
|
||||
s390x_features \
|
||||
diff --git a/tests/libc_test.c b/tests/libc_test.c
|
||||
new file mode 100644
|
||||
index 0000000..0de3d5d
|
||||
--- /dev/null
|
||||
+++ b/tests/libc_test.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+// Compare given libc name and version number to system name and version.
|
||||
+
|
||||
+// Returns
|
||||
+// - 0 if the libc name matches is at least the minimum version (if given).
|
||||
+// - 1 if the libc name doesn't match or the version is lower than requested.
|
||||
+// - 2 if the requested libc name isn't recognised.
|
||||
+// - 3 if there was a usage error (it also prints an error message).
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#ifdef __GLIBC__
|
||||
+#include <gnu/libc-version.h>
|
||||
+#endif
|
||||
+
|
||||
+#define False 0
|
||||
+#define True 1
|
||||
+typedef int Bool;
|
||||
+
|
||||
+/* Assumes the versions are x.y.z, with y and z optional. */
|
||||
+static Bool matches_version(char *min_version) {
|
||||
+ int a1=0, a2=0, a3=0, g1=0, g2=0, g3=0; // 'a' = actual; 'g' = given
|
||||
+ const char *aversion;
|
||||
+
|
||||
+ if (min_version == NULL) return True; // no version specified
|
||||
+
|
||||
+ // get actual version number
|
||||
+#ifdef __GLIBC__
|
||||
+ aversion = gnu_get_libc_version();
|
||||
+#else
|
||||
+ aversion = "unknown";
|
||||
+#endif
|
||||
+ // We expect at least one number.
|
||||
+ if (sscanf(aversion, "%d.%d.%d", &a1, &a2, &a3) < 1) return False;
|
||||
+
|
||||
+ // parse given version number.
|
||||
+ if (sscanf(min_version, "%d.%d.%d", &g1, &g2, &g3) < 1) return False;
|
||||
+
|
||||
+ if (a1 > g1) return True;
|
||||
+ if (a1 < g1) return False;
|
||||
+ if (a2 > g2) return True;
|
||||
+ if (a2 < g2) return False;
|
||||
+ if (a3 >= g3) return True;
|
||||
+
|
||||
+ return False;
|
||||
+}
|
||||
+
|
||||
+static Bool go(char* libc, char *min_version)
|
||||
+{
|
||||
+#ifdef __GLIBC__
|
||||
+ if ( 0 == strcmp( libc, "glibc" )
|
||||
+ && matches_version( min_version ))
|
||||
+ return True;
|
||||
+#endif
|
||||
+
|
||||
+ return False;
|
||||
+}
|
||||
+
|
||||
+//---------------------------------------------------------------------------
|
||||
+// main
|
||||
+//---------------------------------------------------------------------------
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ if ( argc < 2 ) {
|
||||
+ fprintf( stderr, "usage: libc_test <libc-name> [<min-version>]\n" );
|
||||
+ exit(3); // Usage error.
|
||||
+ }
|
||||
+ if (go( argv[1], argv[2] )) {
|
||||
+ return 0; // Matched.
|
||||
+ }
|
||||
+
|
||||
+ if ( 0 == strcmp ( argv[1], "glibc" ) ) {
|
||||
+ return 1; // Requested libc name known, but this isn't it.
|
||||
+ // Or it wasn't the minimum requested version.
|
||||
+ }
|
||||
+ return 2; // Didn't match any known libc name.
|
||||
+}
|
||||
Only in valgrind-3.12.0.RC2: autom4te.cache
|
||||
diff -ur valgrind-3.12.0.RC2.orig/tests/Makefile.in valgrind-3.12.0.RC2/tests/Makefile.in
|
||||
--- valgrind-3.12.0.RC2.orig/tests/Makefile.in 2016-10-21 02:10:24.283643034 +0200
|
||||
+++ valgrind-3.12.0.RC2/tests/Makefile.in 2016-10-21 02:11:09.668003685 +0200
|
||||
@@ -121,10 +121,11 @@
|
||||
@COMPILER_IS_CLANG_TRUE@ -Wno-uninitialized -Wno-unused-value # \
|
||||
@COMPILER_IS_CLANG_TRUE@ clang 3.0.0
|
||||
@COMPILER_IS_CLANG_TRUE@am__append_7 = -Wno-unused-private-field # drd/tests/tsan_unittest.cpp
|
||||
-check_PROGRAMS = arch_test$(EXEEXT) os_test$(EXEEXT) true$(EXEEXT) \
|
||||
- x86_amd64_features$(EXEEXT) s390x_features$(EXEEXT) \
|
||||
- mips_features$(EXEEXT) power_insn_available$(EXEEXT) \
|
||||
- is_ppc64_BE$(EXEEXT) min_power_isa$(EXEEXT)
|
||||
+check_PROGRAMS = arch_test$(EXEEXT) os_test$(EXEEXT) \
|
||||
+ libc_test$(EXEEXT) true$(EXEEXT) x86_amd64_features$(EXEEXT) \
|
||||
+ s390x_features$(EXEEXT) mips_features$(EXEEXT) \
|
||||
+ power_insn_available$(EXEEXT) is_ppc64_BE$(EXEEXT) \
|
||||
+ min_power_isa$(EXEEXT)
|
||||
subdir = tests
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
@@ -142,6 +143,9 @@
|
||||
is_ppc64_BE_SOURCES = is_ppc64_BE.c
|
||||
is_ppc64_BE_OBJECTS = is_ppc64_BE.$(OBJEXT)
|
||||
is_ppc64_BE_LDADD = $(LDADD)
|
||||
+libc_test_SOURCES = libc_test.c
|
||||
+libc_test_OBJECTS = libc_test.$(OBJEXT)
|
||||
+libc_test_LDADD = $(LDADD)
|
||||
min_power_isa_SOURCES = min_power_isa.c
|
||||
min_power_isa_OBJECTS = min_power_isa-min_power_isa.$(OBJEXT)
|
||||
min_power_isa_LDADD = $(LDADD)
|
||||
@@ -201,10 +205,10 @@
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
-SOURCES = arch_test.c is_ppc64_BE.c min_power_isa.c mips_features.c \
|
||||
- os_test.c power_insn_available.c s390x_features.c true.c \
|
||||
- x86_amd64_features.c
|
||||
-DIST_SOURCES = arch_test.c is_ppc64_BE.c min_power_isa.c \
|
||||
+SOURCES = arch_test.c is_ppc64_BE.c libc_test.c min_power_isa.c \
|
||||
+ mips_features.c os_test.c power_insn_available.c \
|
||||
+ s390x_features.c true.c x86_amd64_features.c
|
||||
+DIST_SOURCES = arch_test.c is_ppc64_BE.c libc_test.c min_power_isa.c \
|
||||
mips_features.c os_test.c power_insn_available.c \
|
||||
s390x_features.c true.c x86_amd64_features.c
|
||||
am__can_run_installinfo = \
|
||||
@@ -681,6 +685,10 @@
|
||||
@rm -f is_ppc64_BE$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(is_ppc64_BE_OBJECTS) $(is_ppc64_BE_LDADD) $(LIBS)
|
||||
|
||||
+libc_test$(EXEEXT): $(libc_test_OBJECTS) $(libc_test_DEPENDENCIES) $(EXTRA_libc_test_DEPENDENCIES)
|
||||
+ @rm -f libc_test$(EXEEXT)
|
||||
+ $(AM_V_CCLD)$(LINK) $(libc_test_OBJECTS) $(libc_test_LDADD) $(LIBS)
|
||||
+
|
||||
min_power_isa$(EXEEXT): $(min_power_isa_OBJECTS) $(min_power_isa_DEPENDENCIES) $(EXTRA_min_power_isa_DEPENDENCIES)
|
||||
@rm -f min_power_isa$(EXEEXT)
|
||||
$(AM_V_CCLD)$(min_power_isa_LINK) $(min_power_isa_OBJECTS) $(min_power_isa_LDADD) $(LIBS)
|
||||
@@ -717,6 +725,7 @@
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/is_ppc64_BE.Po@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libc_test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min_power_isa-min_power_isa.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mips_features.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os_test.Po@am__quote@
|
@ -1,85 +0,0 @@
|
||||
commit 4e66d0f7ca6ef2cac6c303e761af605c82b78456
|
||||
Author: petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Tue Jan 31 18:22:20 2017 +0000
|
||||
|
||||
force old implementation of std::string for leak_cpp_interior test
|
||||
|
||||
This patch forces leak_cpp_interior to be compiled using old implementation
|
||||
of std::string.
|
||||
|
||||
Related issue #373069
|
||||
|
||||
Patch by Aleksandar Rikalo.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16217 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/memcheck/tests/leak_cpp_interior.cpp b/memcheck/tests/leak_cpp_interior.cpp
|
||||
index f66fc89..a4b4824 100644
|
||||
--- a/memcheck/tests/leak_cpp_interior.cpp
|
||||
+++ b/memcheck/tests/leak_cpp_interior.cpp
|
||||
@@ -1,3 +1,4 @@
|
||||
+#define _GLIBCXX_USE_CXX11_ABI 0
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp b/memcheck/tests/leak_cpp_interior.stderr.exp
|
||||
index 3228f74..70e2764 100644
|
||||
--- a/memcheck/tests/leak_cpp_interior.stderr.exp
|
||||
+++ b/memcheck/tests/leak_cpp_interior.stderr.exp
|
||||
@@ -2,8 +2,8 @@
|
||||
valgrind output will go to log
|
||||
VALGRIND_DO_LEAK_CHECK
|
||||
4 bytes in 1 blocks are definitely lost in loss record ... of ...
|
||||
- by 0x........: doit() (leak_cpp_interior.cpp:115)
|
||||
- by 0x........: main (leak_cpp_interior.cpp:130)
|
||||
+ by 0x........: doit() (leak_cpp_interior.cpp:116)
|
||||
+ by 0x........: main (leak_cpp_interior.cpp:131)
|
||||
|
||||
LEAK SUMMARY:
|
||||
definitely lost: 4 bytes in 1 blocks
|
||||
diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit
|
||||
index 7a862a3..612fa3e 100644
|
||||
--- a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit
|
||||
+++ b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit
|
||||
@@ -2,8 +2,8 @@
|
||||
valgrind output will go to log
|
||||
VALGRIND_DO_LEAK_CHECK
|
||||
8 bytes in 1 blocks are definitely lost in loss record ... of ...
|
||||
- by 0x........: doit() (leak_cpp_interior.cpp:115)
|
||||
- by 0x........: main (leak_cpp_interior.cpp:130)
|
||||
+ by 0x........: doit() (leak_cpp_interior.cpp:116)
|
||||
+ by 0x........: main (leak_cpp_interior.cpp:131)
|
||||
|
||||
LEAK SUMMARY:
|
||||
definitely lost: 8 bytes in 1 blocks
|
||||
diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit-solaris b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit-solaris
|
||||
index d53e4ce..f7e1a07 100644
|
||||
--- a/memcheck/tests/leak_cpp_interior.stderr.exp-64bit-solaris
|
||||
+++ b/memcheck/tests/leak_cpp_interior.stderr.exp-64bit-solaris
|
||||
@@ -2,8 +2,8 @@
|
||||
valgrind output will go to log
|
||||
VALGRIND_DO_LEAK_CHECK
|
||||
8 bytes in 1 blocks are definitely lost in loss record ... of ...
|
||||
- by 0x........: doit() (leak_cpp_interior.cpp:115)
|
||||
- by 0x........: main (leak_cpp_interior.cpp:130)
|
||||
+ by 0x........: doit() (leak_cpp_interior.cpp:116)
|
||||
+ by 0x........: main (leak_cpp_interior.cpp:131)
|
||||
|
||||
LEAK SUMMARY:
|
||||
definitely lost: 8 bytes in 1 blocks
|
||||
diff --git a/memcheck/tests/leak_cpp_interior.stderr.exp-solaris b/memcheck/tests/leak_cpp_interior.stderr.exp-solaris
|
||||
index 80cd5c3..f9fc390 100644
|
||||
--- a/memcheck/tests/leak_cpp_interior.stderr.exp-solaris
|
||||
+++ b/memcheck/tests/leak_cpp_interior.stderr.exp-solaris
|
||||
@@ -2,8 +2,8 @@
|
||||
valgrind output will go to log
|
||||
VALGRIND_DO_LEAK_CHECK
|
||||
4 bytes in 1 blocks are definitely lost in loss record ... of ...
|
||||
- by 0x........: doit() (leak_cpp_interior.cpp:115)
|
||||
- by 0x........: main (leak_cpp_interior.cpp:130)
|
||||
+ by 0x........: doit() (leak_cpp_interior.cpp:116)
|
||||
+ by 0x........: main (leak_cpp_interior.cpp:131)
|
||||
|
||||
LEAK SUMMARY:
|
||||
definitely lost: 4 bytes in 1 blocks
|
@ -1,139 +0,0 @@
|
||||
commit c7bcd1f2ee2d466fb556bfc2b33c5ab039b0898d
|
||||
Author: sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Fri Jan 20 09:58:15 2017 +0000
|
||||
|
||||
x86-linux: Initialize x86 system GDT on first use. Bug 344139 comment 3.
|
||||
Patch from Sebastian Lackner, sebastian@fds-team.de.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16204 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
index f8c4eb4..2f879d8 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
@@ -294,11 +294,37 @@ void translate_to_hw_format ( /* IN */ vki_modify_ldt_t* inn,
|
||||
out->LdtEnt.Words.word2 = entry_2;
|
||||
}
|
||||
|
||||
-/* Create a zeroed-out GDT. */
|
||||
-static VexGuestX86SegDescr* alloc_zeroed_x86_GDT ( void )
|
||||
+/* Create initial GDT. */
|
||||
+static VexGuestX86SegDescr* alloc_system_x86_GDT ( void )
|
||||
{
|
||||
Int nbytes = VEX_GUEST_X86_GDT_NENT * sizeof(VexGuestX86SegDescr);
|
||||
- return VG_(calloc)("di.syswrap-x86.azxG.1", nbytes, 1);
|
||||
+ VexGuestX86SegDescr* gdt = VG_(calloc)("di.syswrap-x86.azxG.1", nbytes, 1);
|
||||
+ vki_modify_ldt_t info;
|
||||
+ UShort seg;
|
||||
+
|
||||
+ VG_(memset)(&info, 0, sizeof(info));
|
||||
+ info.entry_number = 0;
|
||||
+ info.base_addr = 0;
|
||||
+ info.limit = 0xfffff;
|
||||
+ info.seg_32bit = 1;
|
||||
+ info.contents = 0;
|
||||
+ info.read_exec_only = 0;
|
||||
+ info.limit_in_pages = 1;
|
||||
+ info.seg_not_present = 0;
|
||||
+ info.useable = 0;
|
||||
+ info.reserved = 0;
|
||||
+
|
||||
+ asm volatile("movw %%ds, %0" : : "m" (seg));
|
||||
+ if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
|
||||
+ asm volatile("movw %%ss, %0" : : "m" (seg));
|
||||
+ if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
|
||||
+
|
||||
+ info.contents = 2;
|
||||
+
|
||||
+ asm volatile("movw %%cs, %0" : : "m" (seg));
|
||||
+ if (!(seg & 4)) translate_to_hw_format(&info, &gdt[seg >> 3], 0);
|
||||
+
|
||||
+ return gdt;
|
||||
}
|
||||
|
||||
/* Create a zeroed-out LDT. */
|
||||
@@ -505,7 +531,7 @@ SysRes ML_(x86_sys_set_thread_area) ( ThreadId tid, vki_modify_ldt_t* info )
|
||||
|
||||
/* If the thread doesn't have a GDT, allocate it now. */
|
||||
if (!gdt) {
|
||||
- gdt = alloc_zeroed_x86_GDT();
|
||||
+ gdt = alloc_system_x86_GDT();
|
||||
VG_(threads)[tid].arch.vex.guest_GDT = (HWord)gdt;
|
||||
}
|
||||
|
||||
@@ -564,7 +590,7 @@ static SysRes sys_get_thread_area ( ThreadId tid, vki_modify_ldt_t* info )
|
||||
|
||||
/* If the thread doesn't have a GDT, allocate it now. */
|
||||
if (!gdt) {
|
||||
- gdt = alloc_zeroed_x86_GDT();
|
||||
+ gdt = alloc_system_x86_GDT();
|
||||
VG_(threads)[tid].arch.vex.guest_GDT = (HWord)gdt;
|
||||
}
|
||||
|
||||
@@ -616,7 +642,7 @@ void ML_(x86_setup_LDT_GDT) ( /*OUT*/ ThreadArchState *child,
|
||||
child->vex.guest_GDT = (HWord)NULL;
|
||||
|
||||
if (parent->vex.guest_GDT != (HWord)NULL) {
|
||||
- child->vex.guest_GDT = (HWord)alloc_zeroed_x86_GDT();
|
||||
+ child->vex.guest_GDT = (HWord)alloc_system_x86_GDT();
|
||||
copy_GDT_from_to( (VexGuestX86SegDescr*)parent->vex.guest_GDT,
|
||||
(VexGuestX86SegDescr*)child->vex.guest_GDT );
|
||||
}
|
||||
commit 5f4041b376f7465cd108ad4d1696b0b8a603a175
|
||||
Author: sewardj <sewardj@8f6e269a-dfd6-0310-a8e1-e2731360e62c>
|
||||
Date: Fri Jan 20 10:01:42 2017 +0000
|
||||
|
||||
x86: Recognize the SS segment prefix on x86. Bug 344139 comment 4.
|
||||
Patch from Sebastian Lackner, sebastian@fds-team.de.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/vex/trunk@3299 8f6e269a-dfd6-0310-a8e1-e2731360e62c
|
||||
|
||||
diff --git a/VEX/priv/guest_x86_toIR.c b/VEX/priv/guest_x86_toIR.c
|
||||
index de09d3a..234d68e 100644
|
||||
--- a/VEX/priv/guest_x86_toIR.c
|
||||
+++ b/VEX/priv/guest_x86_toIR.c
|
||||
@@ -1409,6 +1409,7 @@ const HChar* sorbTxt ( UChar sorb )
|
||||
case 0x26: return "%es:";
|
||||
case 0x64: return "%fs:";
|
||||
case 0x65: return "%gs:";
|
||||
+ case 0x36: return "%ss:";
|
||||
default: vpanic("sorbTxt(x86,guest)");
|
||||
}
|
||||
}
|
||||
@@ -1433,6 +1434,7 @@ IRExpr* handleSegOverride ( UChar sorb, IRExpr* virtual )
|
||||
case 0x26: sreg = R_ES; break;
|
||||
case 0x64: sreg = R_FS; break;
|
||||
case 0x65: sreg = R_GS; break;
|
||||
+ case 0x36: sreg = R_SS; break;
|
||||
default: vpanic("handleSegOverride(x86,guest)");
|
||||
}
|
||||
|
||||
@@ -8101,7 +8103,7 @@ DisResult disInstr_X86_WRK (
|
||||
Int sz = 4;
|
||||
|
||||
/* sorb holds the segment-override-prefix byte, if any. Zero if no
|
||||
- prefix has been seen, else one of {0x26, 0x3E, 0x64, 0x65}
|
||||
+ prefix has been seen, else one of {0x26, 0x36, 0x3E, 0x64, 0x65}
|
||||
indicating the prefix. */
|
||||
UChar sorb = 0;
|
||||
|
||||
@@ -8255,6 +8257,7 @@ DisResult disInstr_X86_WRK (
|
||||
case 0x26: /* %ES: */
|
||||
case 0x64: /* %FS: */
|
||||
case 0x65: /* %GS: */
|
||||
+ case 0x36: /* %SS: */
|
||||
if (sorb != 0)
|
||||
goto decode_failure; /* only one seg override allowed */
|
||||
sorb = pre;
|
||||
@@ -8274,9 +8277,6 @@ DisResult disInstr_X86_WRK (
|
||||
}
|
||||
break;
|
||||
}
|
||||
- case 0x36: /* %SS: */
|
||||
- /* SS override cases are not handled */
|
||||
- goto decode_failure;
|
||||
default:
|
||||
goto not_a_prefix;
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
|
||||
Summary: Tool for finding memory management bugs in programs
|
||||
Name: %{?scl_prefix}valgrind
|
||||
Version: 3.12.0
|
||||
Release: 8%{?dist}
|
||||
Version: 3.13.0
|
||||
Release: 0.1.RC1%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
URL: http://www.valgrind.org/
|
||||
@ -58,7 +58,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
# So those will already have their full symbol table.
|
||||
%undefine _include_minidebuginfo
|
||||
|
||||
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||
Source0: ftp://sourceware.org/pub/valgrind/valgrind-%{version}.RC1.tar.bz2
|
||||
|
||||
# Needs investigation and pushing upstream
|
||||
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
||||
@ -69,70 +69,6 @@ Patch2: valgrind-3.9.0-helgrind-race-supp.patch
|
||||
# Make ld.so supressions slightly less specific.
|
||||
Patch3: valgrind-3.9.0-ldso-supp.patch
|
||||
|
||||
# KDE#371396 - workaround helgrind and drd pth_cond_destroy_busy testcase hangs
|
||||
Patch4: valgrind-3.12.0-skip-cond-var.patch
|
||||
|
||||
# RHBZ#1390282 upstream svn r16134
|
||||
# Cleanup none/tests/nocwd.vgtest tmp dirs.
|
||||
Patch5: valgrind-3.12.0-nocwd-cleanup.patch
|
||||
|
||||
# RHBZ#1424367
|
||||
# GCC7 now diagnoses inline assembly that clobbers register r2.
|
||||
# This has always been invalid code, and is no longer quietly tolerated.
|
||||
Patch6: valgrind-3.12.0-ppc64-r2.patch
|
||||
|
||||
# KDE#376611 ppc64 and arm64 don't know about prlimit64 syscall
|
||||
Patch7: valgrind-3.12.0-arm64-ppc64-prlimit64.patch
|
||||
|
||||
# KDE#376279 Handle unknown HINT instructions on aarch64 by ignoring them.
|
||||
Patch8: valgrind-3.12.0-arm64-hint.patch
|
||||
|
||||
# KDE#342040 Valgrind mishandles clone with CLONE_VFORK | CLONE_VM
|
||||
# that clones to a different stack
|
||||
# KDE#373192 Calling posix_spawn in glibc 2.24 completely broken
|
||||
Patch9: valgrind-3.12.0-clone-spawn.patch
|
||||
|
||||
# KDE#372600 process loops forever when fatal signals are arriving quickly
|
||||
Patch10: valgrind-3.12.0-quick-fatal-sigs.patch
|
||||
|
||||
# KDE#372504 Hanging on exit_group
|
||||
Patch11: valgrind-3.12.0-exit_group.patch
|
||||
|
||||
# KDE#373046 Stacks registered by core are never deregistered
|
||||
Patch12: valgrind-3.12.0-deregister-stack.patch
|
||||
|
||||
# KDE#344139
|
||||
# Initialize x86 system GDT on first use.
|
||||
# VEX: Recognize the SS segment prefix on x86.
|
||||
Patch13: valgrind-3.12.0-x86-gdt-and-ss.patch
|
||||
|
||||
# KDE#352767 - Wine/valgrind: noted but unhandled ioctl 0x5307 (CDROMSTOP)
|
||||
# KDE#348616 - Wine/valgrind: noted but unhandled ioctl 0x5390 (DVD_READ_STRUCT)
|
||||
Patch14: valgrind-3.12.0-cd-dvd-ioctl.patch
|
||||
|
||||
# KDE#373069 force old implementation of std::string for leak_cpp_interior test
|
||||
Patch15: valgrind-3.12.0-tests-cxx11_abi_0.patch
|
||||
|
||||
# KDE#375806 add suppression for helgrind/tests/tc22_exit_w_lock
|
||||
Patch16: valgrind-3.12.0-helgrind-dl_allocate_tls-supp.patch
|
||||
|
||||
# KDE#372195 Power PC, xxsel instruction is not always recognized.
|
||||
Patch17: valgrind-3.12.0-ppc-xxsel.patch
|
||||
|
||||
# Combined valgrind svn r16229:r16248 patches.
|
||||
# Enables pivot_root, sync_file_range, unshare, get_robust_list,
|
||||
# delete_module, sched_rr_get_interval, tkill, request_key, move_pages,
|
||||
# rt_tgsigqueueinfo, fanotify_init, fanotify_mark, clock_adjtime, kcmp,
|
||||
# getcpu and sethostname syscalls on arm64.
|
||||
Patch18: valgrind-3.12.0-aarch64-syscalls.patch
|
||||
|
||||
# KDE#377427 Fix incorrect register pair check for lxv, stxv, stxsd,
|
||||
# stxssp, lxsd, lxssp instructions
|
||||
Patch19: valgrind-3.12.0-powerpc-register-pair.patch
|
||||
|
||||
# KDE#377478 PPC64: ISA 3.0 setup fixes
|
||||
Patch20: valgrind-3.12.0-ppc64-isa-3_00.patch
|
||||
|
||||
%if %{build_multilib}
|
||||
# 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
|
||||
@ -243,28 +179,11 @@ Valgrind User Manual for details.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}
|
||||
%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}.RC1
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -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
|
||||
|
||||
%build
|
||||
# We need to use the software collection compiler and binutils if available.
|
||||
@ -390,6 +309,10 @@ cat /proc/cpuinfo
|
||||
# the testsuite sets all flags necessary. See also configure above.
|
||||
make %{?_smp_mflags} CFLAGS="" CXXFLAGS="" LDFLAGS="" check
|
||||
|
||||
# Workaround https://bugzilla.redhat.com/show_bug.cgi?id=1434601
|
||||
# for gdbserver tests.
|
||||
export PYTHONCOERCECLOCALE=0
|
||||
|
||||
echo ===============TESTING===================
|
||||
# On arm the gdb integration tests hang for unknown reasons.
|
||||
%ifarch %{arm}
|
||||
@ -458,8 +381,11 @@ echo ===============END TESTING===============
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 12 2017 Mark Wielaard <mjw@redhat.com>
|
||||
* Fri Jun 2 2017 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-0.1.RC1
|
||||
- Update description as suggested by Ivo Raisr.
|
||||
- Workaround gdb/python bug in testsuite (#1434601)
|
||||
- Update to upstream 3.13.0-RC1.
|
||||
- Drop all upstreamed patches.
|
||||
|
||||
* Tue Mar 28 2017 Mark Wielaard <mjw@redhat.com> - 3.12.0-8
|
||||
- Add valgrind-3.12.0-powerpc-register-pair.patch
|
||||
|
Loading…
Reference in New Issue
Block a user