3.3.0-3
This commit is contained in:
parent
0c685fe5fe
commit
836340c236
236
valgrind-3.3.0-glibc28.patch
Normal file
236
valgrind-3.3.0-glibc28.patch
Normal file
@ -0,0 +1,236 @@
|
||||
--- valgrind-3.3.0/configure.in.jj 2008-04-16 05:48:10.000000000 -0400
|
||||
+++ valgrind-3.3.0/configure.in 2008-04-16 05:54:04.000000000 -0400
|
||||
@@ -471,6 +471,16 @@ AC_EGREP_CPP([GLIBC_27], [
|
||||
],
|
||||
libc="2.7")
|
||||
|
||||
+AC_EGREP_CPP([GLIBC_28], [
|
||||
+#include <features.h>
|
||||
+#ifdef __GNU_LIBRARY__
|
||||
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
|
||||
+ GLIBC_28
|
||||
+ #endif
|
||||
+#endif
|
||||
+],
|
||||
+libc="2.8")
|
||||
+
|
||||
AC_EGREP_CPP([AIX5_LIBC], [
|
||||
#include <standards.h>
|
||||
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
|
||||
@@ -521,6 +531,12 @@ case "${libc}" in
|
||||
DEFAULT_SUPP="glibc-2.7.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.8)
|
||||
+ AC_MSG_RESULT(2.8 family)
|
||||
+ AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
|
||||
+ DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
+ ;;
|
||||
aix5)
|
||||
AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
|
||||
AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
|
||||
@@ -529,7 +545,7 @@ case "${libc}" in
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT(unsupported version)
|
||||
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.7])
|
||||
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.8])
|
||||
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 libc])
|
||||
;;
|
||||
esac
|
||||
--- valgrind-3.3.0/glibc-2.8.supp.jj 2008-04-16 05:50:23.000000000 -0400
|
||||
+++ valgrind-3.3.0/glibc-2.8.supp 2008-04-16 05:50:35.000000000 -0400
|
||||
@@ -0,0 +1,37 @@
|
||||
+
|
||||
+# Errors to suppress by default with glibc 2.8.x
|
||||
+
|
||||
+# Format of this file is:
|
||||
+# {
|
||||
+# name_of_suppression
|
||||
+# tool_name:supp_kind
|
||||
+# (optional extra info for some suppression types)
|
||||
+# caller0 name, or /name/of/so/file.so
|
||||
+# caller1 name, or ditto
|
||||
+# (optionally: caller2 name)
|
||||
+# (optionally: caller3 name)
|
||||
+# }
|
||||
+#
|
||||
+# For Memcheck, the supp_kinds are:
|
||||
+#
|
||||
+# Param Value1 Value2 Value4 Value8 Value16 Jump
|
||||
+# Free Addr1 Addr2 Addr4 Addr8 Addr16
|
||||
+# Cond (previously known as Value0)
|
||||
+#
|
||||
+# and the optional extra info is:
|
||||
+# if Param: name of system call param
|
||||
+
|
||||
+{
|
||||
+ dl-hack1
|
||||
+ Memcheck:Cond
|
||||
+ fun:_dl_start
|
||||
+ fun:_start
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ dl-hack3-1
|
||||
+ Memcheck:Cond
|
||||
+ obj:/lib*/ld-2.8*.so*
|
||||
+ obj:/lib*/ld-2.8*.so*
|
||||
+ obj:/lib*/ld-2.8*.so*
|
||||
+}
|
||||
--- valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp.jj 2008-04-16 05:48:10.000000000 -0400
|
||||
+++ valgrind-3.3.0/glibc-2.34567-NPTL-helgrind.supp 2008-04-16 05:51:59.000000000 -0400
|
||||
@@ -1,12 +1,12 @@
|
||||
|
||||
##----------------------------------------------------------------------##
|
||||
# Suppressions for the Helgrind tool when using
|
||||
-# a glibc-2.{2,3,4,5,6} system
|
||||
+# a glibc-2.{2,3,4,5,6,7,8} system
|
||||
|
||||
######------------ glibc-2.5 specific ------------######
|
||||
#
|
||||
## NB. This is the "reference set". Derived sets for
|
||||
-## glibc 2.7, 2.6, 2.4 and 2.3 follow below.
|
||||
+## glibc 2.8, 2.7, 2.6, 2.4 and 2.3 follow below.
|
||||
{
|
||||
helgrind-glibc25-001
|
||||
Helgrind:Race
|
||||
@@ -145,6 +145,65 @@
|
||||
fun:start_thread
|
||||
}
|
||||
|
||||
+######------------ glibc-2.8 specific ---------######
|
||||
+#
|
||||
+{
|
||||
+ helgrind-glibc28-001
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/ld-2.8.*so
|
||||
+ obj:/lib*/ld-2.8.*so
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-003
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/ld-2.8.*so
|
||||
+ obj:/lib*/libc-2.8.*so
|
||||
+ obj:/lib*/libc-2.8.*so
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-004
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/libc-2.8.*so
|
||||
+ obj:/lib*/libc-2.8.*so
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-005
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-011
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/libc-2.8.*so
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ helgrind-glibc28-101
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+ fun:pthread_*
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-102
|
||||
+ Helgrind:Race
|
||||
+ fun:mythread_wrapper
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-107
|
||||
+ Helgrind:Race
|
||||
+ obj:/lib*/libpthread-2.8.*so
|
||||
+ fun:sem_*
|
||||
+}
|
||||
+{
|
||||
+ helgrind-glibc28-199
|
||||
+ Helgrind:Race
|
||||
+ fun:pthread_barrier_wait
|
||||
+}
|
||||
+
|
||||
######------------ glibc-2.7 specific ---------######
|
||||
#
|
||||
{
|
||||
@@ -198,11 +257,6 @@
|
||||
obj:/lib*/libpthread-2.7.*so
|
||||
fun:sem_*
|
||||
}
|
||||
-{
|
||||
- helgrind-glibc27-199
|
||||
- Helgrind:Race
|
||||
- fun:pthread_barrier_wait
|
||||
-}
|
||||
|
||||
######------------ glibc-2.6 specific ---------######
|
||||
#
|
||||
--- valgrind-3.3.0/configure.jj 2008-04-16 05:48:10.000000000 -0400
|
||||
+++ valgrind-3.3.0/configure 2008-04-16 05:54:08.000000000 -0400
|
||||
@@ -4624,6 +4624,28 @@ cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __GNU_LIBRARY__
|
||||
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 8)
|
||||
+ GLIBC_28
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
+_ACEOF
|
||||
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||
+ $EGREP "GLIBC_28" >/dev/null 2>&1; then
|
||||
+ libc="2.8"
|
||||
+fi
|
||||
+rm -f conftest*
|
||||
+
|
||||
+
|
||||
+cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
#include <standards.h>
|
||||
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
|
||||
AIX5_LIBC
|
||||
@@ -4710,6 +4732,17 @@ _ACEOF
|
||||
DEFAULT_SUPP="glibc-2.7.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.8)
|
||||
+ echo "$as_me:$LINENO: result: 2.8 family" >&5
|
||||
+echo "${ECHO_T}2.8 family" >&6
|
||||
+
|
||||
+cat >>confdefs.h <<\_ACEOF
|
||||
+#define GLIBC_2_8 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
+ ;;
|
||||
aix5)
|
||||
echo "$as_me:$LINENO: result: AIX 5.1 or 5.2 or 5.3" >&5
|
||||
echo "${ECHO_T}AIX 5.1 or 5.2 or 5.3" >&6
|
||||
@@ -4724,8 +4757,8 @@ _ACEOF
|
||||
*)
|
||||
echo "$as_me:$LINENO: result: unsupported version" >&5
|
||||
echo "${ECHO_T}unsupported version" >&6
|
||||
- { { echo "$as_me:$LINENO: error: Valgrind requires glibc version 2.2 - 2.7" >&5
|
||||
-echo "$as_me: error: Valgrind requires glibc version 2.2 - 2.7" >&2;}
|
||||
+ { { echo "$as_me:$LINENO: error: Valgrind requires glibc version 2.2 - 2.8" >&5
|
||||
+echo "$as_me: error: Valgrind requires glibc version 2.2 - 2.8" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
{ { echo "$as_me:$LINENO: error: or AIX 5.1 or 5.2 or 5.3 libc" >&5
|
||||
echo "$as_me: error: or AIX 5.1 or 5.2 or 5.3 libc" >&2;}
|
163
valgrind-3.3.0-syscalls1.patch
Normal file
163
valgrind-3.3.0-syscalls1.patch
Normal file
@ -0,0 +1,163 @@
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 7260)
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c (revision 7880)
|
||||
@@ -1269,7 +1270,7 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
GENXY(__NR_wait4, sys_wait4), // 114
|
||||
|
||||
// _____(__NR_swapoff, sys_swapoff), // 115
|
||||
-// _____(__NR_sysinfo, sys_sysinfo), // 116
|
||||
+ LINXY(__NR_sysinfo, sys_sysinfo), // 116
|
||||
PLAXY(__NR_ipc, sys_ipc), // 117
|
||||
GENX_(__NR_fsync, sys_fsync), // 118
|
||||
// _____(__NR_sigreturn, sys_sigreturn), // 119
|
||||
@@ -1328,13 +1329,13 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
GENX_(__NR_mremap, sys_mremap), // 163
|
||||
// _____(__NR_setresuid, sys_setresuid), // 164
|
||||
|
||||
-// _____(__NR_getresuid, sys_getresuid), // 165
|
||||
+ LINXY(__NR_getresuid, sys_getresuid), // 165
|
||||
// _____(__NR_query_module, sys_query_module), // 166
|
||||
GENXY(__NR_poll, sys_poll), // 167
|
||||
// _____(__NR_nfsservctl, sys_nfsservctl), // 168
|
||||
// _____(__NR_setresgid, sys_setresgid), // 169
|
||||
|
||||
-// _____(__NR_getresgid, sys_getresgid), // 170
|
||||
+ LINXY(__NR_getresgid, sys_getresgid), // 170
|
||||
// _____(__NR_prctl, sys_prctl), // 171
|
||||
PLAX_(__NR_rt_sigreturn, sys_rt_sigreturn), // 172
|
||||
LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c (revision 7260)
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c (revision 7880)
|
||||
@@ -2115,6 +2118,17 @@ POST(sys_waitid)
|
||||
POST_MEM_WRITE( ARG5, sizeof(struct vki_rusage) );
|
||||
}
|
||||
|
||||
+PRE(sys_sync_file_range)
|
||||
+{
|
||||
+ PRINT("sys_sync_file_range ( %d, %lld, %lld, %d )",
|
||||
+ ARG1,ARG2,ARG3,ARG4);
|
||||
+ PRE_REG_READ4(long, "sync_file_range",
|
||||
+ int, fd, vki_loff_t, offset, vki_loff_t, nbytes,
|
||||
+ unsigned int, flags);
|
||||
+ if (!ML_(fd_allowed)(ARG1, "sync_file_range", tid, False))
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+}
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
utime wrapper
|
||||
------------------------------------------------------------------ */
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h (revision 7260)
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h (revision 7880)
|
||||
@@ -220,6 +220,9 @@ DECL_TEMPLATE(linux, sys_rt_sigtimedwait
|
||||
DECL_TEMPLATE(linux, sys_rt_sigqueueinfo);
|
||||
DECL_TEMPLATE(linux, sys_rt_sigsuspend);
|
||||
|
||||
+// Linux-specific?
|
||||
+DECL_TEMPLATE(linux, sys_sync_file_range);
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
Wrappers for sockets and ipc-ery. These are split into standalone
|
||||
procedures because x86-linux hides them inside multiplexors
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 7260)
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c (revision 7880)
|
||||
@@ -1371,6 +1374,12 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
// LINX_(__NR_unshare, sys_unshare), // 272
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 273
|
||||
LINXY(__NR_get_robust_list, sys_get_robust_list), // 274
|
||||
+
|
||||
+// LINX_(__NR_splice, sys_ni_syscall), // 275
|
||||
+// LINX_(__NR_tee, sys_ni_syscall), // 276
|
||||
+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 277
|
||||
+// LINX_(__NR_vmsplice, sys_ni_syscall), // 278
|
||||
+// LINX_(__NR_move_pages, sys_ni_syscall), // 279
|
||||
};
|
||||
|
||||
const UInt ML_(syscall_table_size) =
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c (revision 7260)
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c (revision 7880)
|
||||
@@ -2216,6 +2217,14 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
// LINX_(__NR_unshare, sys_unshare), // 310
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 311
|
||||
LINXY(__NR_get_robust_list, sys_get_robust_list), // 312
|
||||
+// LINX_(__NR_splice, sys_ni_syscall), // 313
|
||||
+ LINX_(__NR_sync_file_range, sys_sync_file_range), // 314
|
||||
+
|
||||
+// LINX_(__NR_tee, sys_ni_syscall), // 315
|
||||
+// LINX_(__NR_vmsplice, sys_ni_syscall), // 316
|
||||
+// LINX_(__NR_move_pages, sys_ni_syscall), // 317
|
||||
+// LINX_(__NR_getcpu, sys_ni_syscall), // 318
|
||||
+// LINX_(__NR_epoll_pwait, sys_ni_syscall), // 319
|
||||
|
||||
LINX_(__NR_utimensat, sys_utimensat), // 320
|
||||
};
|
||||
--- valgrind-3.3.0/include/vki/vki-scnums-amd64-linux.h 2007-12-11 00:18:25.000000000 +0100
|
||||
+++ valgrind-3.3.0/include/vki/vki-scnums-amd64-linux.h 2008-04-16 11:48:19.000000000 +0200
|
||||
@@ -360,6 +360,13 @@
|
||||
#define __NR_tee 276
|
||||
#define __NR_sync_file_range 277
|
||||
#define __NR_vmsplice 278
|
||||
+#define __NR_move_pages 279
|
||||
+#define __NR_utimensat 280
|
||||
+#define __NR_epoll_pwait 281
|
||||
+#define __NR_signalfd 282
|
||||
+#define __NR_timerfd 283
|
||||
+#define __NR_eventfd 284
|
||||
+#define __NR_fallocate 285
|
||||
|
||||
#endif /* __VKI_SCNUMS_AMD64_LINUX_H */
|
||||
|
||||
--- valgrind-3.3.0/include/vki/vki-scnums-ppc32-linux.h 2007-12-11 00:18:25.000000000 +0100
|
||||
+++ valgrind-3.3.0/include/vki/vki-scnums-ppc32-linux.h 2008-04-16 11:48:19.000000000 +0200
|
||||
@@ -343,8 +343,17 @@
|
||||
#define __NR_faccessat 298
|
||||
#define __NR_get_robust_list 299
|
||||
#define __NR_set_robust_list 300
|
||||
+#define __NR_move_pages 301
|
||||
+#define __NR_getcpu 302
|
||||
+#define __NR_epoll_pwait 303
|
||||
+#define __NR_utimensat 304
|
||||
+#define __NR_signalfd 305
|
||||
+#define __NR_timerfd 306
|
||||
+#define __NR_eventfd 307
|
||||
+#define __NR_sync_file_range2 308
|
||||
+#define __NR_fallocate 309
|
||||
|
||||
-#define __NR_syscalls 301
|
||||
+#define __NR_syscalls 310
|
||||
|
||||
#endif /* __VKI_SCNUMS_PPC32_LINUX_H */
|
||||
|
||||
--- valgrind-3.3.0/include/vki/vki-scnums-ppc64-linux.h 2007-12-11 00:18:25.000000000 +0100
|
||||
+++ valgrind-3.3.0/include/vki/vki-scnums-ppc64-linux.h 2008-04-16 11:48:19.000000000 +0200
|
||||
@@ -335,6 +335,15 @@
|
||||
#define __NR_faccessat 298
|
||||
#define __NR_get_robust_list 299
|
||||
#define __NR_set_robust_list 300
|
||||
+#define __NR_move_pages 301
|
||||
+#define __NR_getcpu 302
|
||||
+#define __NR_epoll_pwait 303
|
||||
+#define __NR_utimensat 304
|
||||
+#define __NR_signalfd 305
|
||||
+#define __NR_timerfd 306
|
||||
+#define __NR_eventfd 307
|
||||
+#define __NR_sync_file_range2 308
|
||||
+#define __NR_fallocate 309
|
||||
|
||||
#endif /* __VKI_SCNUMS_PPC64_LINUX_H */
|
||||
|
||||
--- valgrind-3.3.0/include/vki/vki-scnums-x86-linux.h 2007-12-11 00:18:25.000000000 +0100
|
||||
+++ valgrind-3.3.0/include/vki/vki-scnums-x86-linux.h 2008-04-16 11:48:19.000000000 +0200
|
||||
@@ -351,7 +351,14 @@
|
||||
#define __NR_sync_file_range 314
|
||||
#define __NR_tee 315
|
||||
#define __NR_vmsplice 316
|
||||
+#define __NR_move_pages 317
|
||||
+#define __NR_getcpu 318
|
||||
+#define __NR_epoll_pwait 319
|
||||
#define __NR_utimensat 320
|
||||
+#define __NR_signalfd 321
|
||||
+#define __NR_timerfd 322
|
||||
+#define __NR_eventfd 323
|
||||
+#define __NR_fallocate 324
|
||||
|
||||
#endif /* __VKI_SCNUMS_X86_LINUX_H */
|
||||
|
258
valgrind-3.3.0-syscalls2.patch
Normal file
258
valgrind-3.3.0-syscalls2.patch
Normal file
@ -0,0 +1,258 @@
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-linux.c 2008-04-16 14:45:32.000000000 +0200
|
||||
@@ -985,7 +985,7 @@ PRE(sys_ppoll)
|
||||
UInt i;
|
||||
struct vki_pollfd* ufds = (struct vki_pollfd *)ARG1;
|
||||
*flags |= SfMayBlock;
|
||||
- PRINT("sys_ppoll ( %p, %d, %p, %p, %llu )\n", ARG1,ARG2,ARG3,ARG4,ARG5);
|
||||
+ PRINT("sys_ppoll ( %p, %d, %p, %p, %llu )\n", ARG1,ARG2,ARG3,ARG4,(ULong)ARG5);
|
||||
PRE_REG_READ5(long, "ppoll",
|
||||
struct vki_pollfd *, ufds, unsigned int, nfds,
|
||||
struct vki_timespec *, tsp, vki_sigset_t *, sigmask,
|
||||
@@ -1069,6 +1069,41 @@ POST(sys_epoll_wait)
|
||||
POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ;
|
||||
}
|
||||
|
||||
+PRE(sys_epoll_pwait)
|
||||
+{
|
||||
+ *flags |= SfMayBlock;
|
||||
+ PRINT("sys_epoll_pwait ( %d, %p, %d, %d, %p, %llu )", ARG1,ARG2,ARG3,ARG4,ARG5,(ULong)ARG6);
|
||||
+ PRE_REG_READ6(long, "epoll_pwait",
|
||||
+ int, epfd, struct vki_epoll_event *, events,
|
||||
+ int, maxevents, int, timeout, vki_sigset_t *, sigmask,
|
||||
+ vki_size_t, sigsetsize);
|
||||
+ PRE_MEM_WRITE( "epoll_pwait(events)", ARG2, sizeof(struct vki_epoll_event)*ARG3);
|
||||
+ if (ARG4)
|
||||
+ PRE_MEM_READ( "epoll_pwait(sigmask)", ARG5, sizeof(vki_sigset_t) );
|
||||
+}
|
||||
+POST(sys_epoll_pwait)
|
||||
+{
|
||||
+ vg_assert(SUCCESS);
|
||||
+ if (RES > 0)
|
||||
+ POST_MEM_WRITE( ARG2, sizeof(struct vki_epoll_event)*RES ) ;
|
||||
+}
|
||||
+
|
||||
+PRE(sys_eventfd)
|
||||
+{
|
||||
+ PRINT("sys_eventfd ( %u )", ARG1);
|
||||
+ PRE_REG_READ1(long, "sys_eventfd", unsigned int, count);
|
||||
+}
|
||||
+POST(sys_eventfd)
|
||||
+{
|
||||
+ if (!ML_(fd_allowed)(RES, "eventfd", tid, True)) {
|
||||
+ VG_(close)(RES);
|
||||
+ SET_STATUS_Failure( VKI_EMFILE );
|
||||
+ } else {
|
||||
+ if (VG_(clo_track_fds))
|
||||
+ ML_(record_fd_open_nameless) (tid, RES);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
tid-related wrappers
|
||||
------------------------------------------------------------------ */
|
||||
@@ -1669,6 +1704,27 @@ PRE(sys_timer_delete)
|
||||
PRE_REG_READ1(long, "timer_delete", vki_timer_t, timerid);
|
||||
}
|
||||
|
||||
+PRE(sys_timerfd)
|
||||
+{
|
||||
+ PRINT("sys_timerfd ( %d, %d, %p )", ARG1, ARG2, ARG3);
|
||||
+ PRE_REG_READ3(long, "sys_timerfd",
|
||||
+ int, fd, int, clockid, const struct itimerspec *, tmr);
|
||||
+ PRE_MEM_READ( "timerfd(tmr)", ARG3,
|
||||
+ sizeof(struct vki_itimerspec) );
|
||||
+ if (ARG1 != -1 && !ML_(fd_allowed)(ARG1, "timerfd", tid, False))
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+}
|
||||
+POST(sys_timerfd)
|
||||
+{
|
||||
+ if (!ML_(fd_allowed)(RES, "timerfd", tid, True)) {
|
||||
+ VG_(close)(RES);
|
||||
+ SET_STATUS_Failure( VKI_EMFILE );
|
||||
+ } else {
|
||||
+ if (VG_(clo_track_fds))
|
||||
+ ML_(record_fd_open_nameless) (tid, RES);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
capabilities wrappers
|
||||
------------------------------------------------------------------ */
|
||||
@@ -2217,6 +2273,27 @@ POST(sys_sigprocmask)
|
||||
}
|
||||
#endif
|
||||
|
||||
+PRE(sys_signalfd)
|
||||
+{
|
||||
+ PRINT("sys_signalfd ( %d, %p, %llu )", ARG1, ARG2, (ULong) ARG3);
|
||||
+ PRE_REG_READ3(long, "sys_signalfd",
|
||||
+ int, fd, vki_sigset_t *, sigmask, vki_size_t, sigsetsize);
|
||||
+ PRE_MEM_READ( "signalfd(sigmask)", ARG2, sizeof(vki_sigset_t) );
|
||||
+ if (ARG1 != -1 && !ML_(fd_allowed)(ARG1, "signalfd", tid, False))
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+}
|
||||
+POST(sys_signalfd)
|
||||
+{
|
||||
+ if (!ML_(fd_allowed)(RES, "signalfd", tid, True)) {
|
||||
+ VG_(close)(RES);
|
||||
+ SET_STATUS_Failure( VKI_EMFILE );
|
||||
+ } else {
|
||||
+ if (VG_(clo_track_fds))
|
||||
+ ML_(record_fd_open_nameless) (tid, RES);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
rt_sig* wrappers
|
||||
------------------------------------------------------------------ */
|
||||
@@ -2544,7 +2621,17 @@ PRE(sys_futimesat)
|
||||
int, dfd, char *, filename, struct timeval *, tvp);
|
||||
PRE_MEM_RASCIIZ( "futimesat(filename)", ARG2 );
|
||||
if (ARG3 != 0)
|
||||
- PRE_MEM_READ( "futimesat(tvp)", ARG3, sizeof(struct vki_timeval) );
|
||||
+ PRE_MEM_READ( "futimesat(tvp)", ARG3, 2 * sizeof(struct vki_timeval) );
|
||||
+}
|
||||
+
|
||||
+PRE(sys_utimensat)
|
||||
+{
|
||||
+ PRINT("sys_utimensat ( %d, %p(%s), %p, 0x%x )", ARG1,ARG2,ARG2,ARG3,ARG4);
|
||||
+ PRE_REG_READ4(long, "utimensat",
|
||||
+ int, dfd, char *, filename, struct timespec *, utimes, int, flags);
|
||||
+ PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 );
|
||||
+ if (ARG3 != 0)
|
||||
+ PRE_MEM_READ( "utimensat(tvp)", ARG3, 2 * sizeof(struct vki_timespec) );
|
||||
}
|
||||
|
||||
PRE(sys_newfstatat)
|
||||
@@ -2825,19 +2912,6 @@ PRE(sys_ioprio_set)
|
||||
PRE_REG_READ3(int, "ioprio_set", int, which, int, who, int, ioprio);
|
||||
}
|
||||
|
||||
-
|
||||
-/* XXX I don't think this is really the right place for this.
|
||||
- Move it elsewhere in this file? */
|
||||
-PRE(sys_utimensat)
|
||||
-{
|
||||
- PRINT("sys_utimensat ( %d, %p(%s), %p )", ARG1,ARG2,ARG2,ARG3);
|
||||
- PRE_REG_READ3(long, "utimensat",
|
||||
- int, dfd, char *, filename, struct timespec *, tvp);
|
||||
- PRE_MEM_RASCIIZ( "utimensat(filename)", ARG2 );
|
||||
- if (ARG3 != 0)
|
||||
- PRE_MEM_READ( "utimensat(tvp)", ARG3, sizeof(struct vki_timespec) );
|
||||
-}
|
||||
-
|
||||
#undef PRE
|
||||
#undef POST
|
||||
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-generic.c.jj 2007-12-11 00:18:43.000000000 +0100
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-generic.c 2008-04-16 16:52:43.000000000 +0200
|
||||
@@ -5638,7 +5638,7 @@ PRE(sys_utimes)
|
||||
PRE_REG_READ2(long, "utimes", char *, filename, struct timeval *, tvp);
|
||||
PRE_MEM_RASCIIZ( "utimes(filename)", ARG1 );
|
||||
if (ARG2 != 0)
|
||||
- PRE_MEM_READ( "utimes(tvp)", ARG2, sizeof(struct vki_timeval) );
|
||||
+ PRE_MEM_READ( "utimes(tvp)", ARG2, 2 * sizeof(struct vki_timeval) );
|
||||
}
|
||||
|
||||
PRE(sys_acct)
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc64-linux.c 2008-04-16 15:55:19.000000000 +0200
|
||||
@@ -1478,7 +1478,15 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
LINX_(__NR_faccessat, sys_faccessat), // 298
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 299
|
||||
LINXY(__NR_get_robust_list, sys_get_robust_list), // 300
|
||||
-
|
||||
+// LINX_(__NR_move_pages, sys_ni_syscall), // 301
|
||||
+// LINX_(__NR_getcpu, sys_ni_syscall), // 302
|
||||
+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303
|
||||
+ LINX_(__NR_utimensat, sys_utimensat), // 304
|
||||
+ LINXY(__NR_signalfd, sys_signalfd), // 305
|
||||
+ LINXY(__NR_timerfd, sys_timerfd), // 306
|
||||
+ LINX_(__NR_eventfd, sys_eventfd), // 307
|
||||
+// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308
|
||||
+// LINX_(__NR_fallocate, sys_ni_syscall), // 309
|
||||
};
|
||||
|
||||
const UInt ML_(syscall_table_size) =
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-x86-linux.c 2008-04-16 14:51:31.000000000 +0200
|
||||
@@ -2224,9 +2224,13 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
// LINX_(__NR_vmsplice, sys_ni_syscall), // 316
|
||||
// LINX_(__NR_move_pages, sys_ni_syscall), // 317
|
||||
// LINX_(__NR_getcpu, sys_ni_syscall), // 318
|
||||
-// LINX_(__NR_epoll_pwait, sys_ni_syscall), // 319
|
||||
+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 319
|
||||
|
||||
LINX_(__NR_utimensat, sys_utimensat), // 320
|
||||
+ LINXY(__NR_signalfd, sys_signalfd), // 321
|
||||
+ LINXY(__NR_timerfd, sys_timerfd), // 322
|
||||
+ LINX_(__NR_eventfd, sys_eventfd), // 323
|
||||
+// LINX_(__NR_fallocate, sys_ni_syscall), // 324
|
||||
};
|
||||
|
||||
const UInt ML_(syscall_table_size) =
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/priv_syswrap-linux.h 2008-04-16 14:49:09.000000000 +0200
|
||||
@@ -82,6 +82,8 @@ DECL_TEMPLATE(linux, sys_ppoll);
|
||||
DECL_TEMPLATE(linux, sys_epoll_create);
|
||||
DECL_TEMPLATE(linux, sys_epoll_ctl);
|
||||
DECL_TEMPLATE(linux, sys_epoll_wait);
|
||||
+DECL_TEMPLATE(linux, sys_epoll_pwait);
|
||||
+DECL_TEMPLATE(linux, sys_eventfd);
|
||||
|
||||
DECL_TEMPLATE(linux, sys_gettid);
|
||||
DECL_TEMPLATE(linux, sys_set_tid_address);
|
||||
@@ -124,6 +126,9 @@ DECL_TEMPLATE(linux, sys_timer_settime);
|
||||
DECL_TEMPLATE(linux, sys_timer_gettime);
|
||||
DECL_TEMPLATE(linux, sys_timer_getoverrun);
|
||||
DECL_TEMPLATE(linux, sys_timer_delete);
|
||||
+DECL_TEMPLATE(linux, sys_timerfd);
|
||||
+
|
||||
+DECL_TEMPLATE(linux, sys_signalfd);
|
||||
|
||||
DECL_TEMPLATE(linux, sys_capget);
|
||||
DECL_TEMPLATE(linux, sys_capset);
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc32-linux.c.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-ppc32-linux.c 2008-04-16 15:49:43.000000000 +0200
|
||||
@@ -1823,6 +1823,15 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
LINX_(__NR_faccessat, sys_faccessat), // 298
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 299
|
||||
LINXY(__NR_get_robust_list, sys_get_robust_list), // 300
|
||||
+// LINX_(__NR_move_pages, sys_ni_syscall), // 301
|
||||
+// LINX_(__NR_getcpu, sys_ni_syscall), // 302
|
||||
+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 303
|
||||
+ LINX_(__NR_utimensat, sys_utimensat), // 304
|
||||
+ LINXY(__NR_signalfd, sys_signalfd), // 305
|
||||
+ LINXY(__NR_timerfd, sys_timerfd), // 306
|
||||
+ LINX_(__NR_eventfd, sys_eventfd), // 307
|
||||
+// LINX_(__NR_sync_file_range2, sys_ni_syscall), // 308
|
||||
+// LINX_(__NR_fallocate, sys_ni_syscall), // 309
|
||||
};
|
||||
|
||||
const UInt ML_(syscall_table_size) =
|
||||
--- valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c.jj 2008-04-16 11:48:14.000000000 +0200
|
||||
+++ valgrind-3.3.0/coregrind/m_syswrap/syswrap-amd64-linux.c 2008-04-16 14:45:43.000000000 +0200
|
||||
@@ -1370,7 +1370,7 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
LINX_(__NR_faccessat, sys_faccessat), // 269
|
||||
|
||||
LINX_(__NR_pselect6, sys_pselect6), // 270
|
||||
-// LINXY(__NR_ppoll, sys_ni_syscall), // 271
|
||||
+ LINXY(__NR_ppoll, sys_ppoll), // 271
|
||||
// LINX_(__NR_unshare, sys_unshare), // 272
|
||||
LINX_(__NR_set_robust_list, sys_set_robust_list), // 273
|
||||
LINXY(__NR_get_robust_list, sys_get_robust_list), // 274
|
||||
@@ -1380,6 +1380,12 @@ const SyscallTableEntry ML_(syscall_tabl
|
||||
LINX_(__NR_sync_file_range, sys_sync_file_range), // 277
|
||||
// LINX_(__NR_vmsplice, sys_ni_syscall), // 278
|
||||
// LINX_(__NR_move_pages, sys_ni_syscall), // 279
|
||||
+ LINX_(__NR_utimensat, sys_utimensat), // 280
|
||||
+ LINXY(__NR_epoll_pwait, sys_epoll_pwait), // 281
|
||||
+ LINXY(__NR_signalfd, sys_signalfd), // 282
|
||||
+ LINXY(__NR_timerfd, sys_timerfd), // 283
|
||||
+ LINX_(__NR_eventfd, sys_eventfd), // 284
|
||||
+// LINX_(__NR_fallocate, sys_ni_syscall), // 285
|
||||
};
|
||||
|
||||
const UInt ML_(syscall_table_size) =
|
@ -1,7 +1,7 @@
|
||||
Summary: Tool for finding memory management bugs in programs
|
||||
Name: valgrind
|
||||
Version: 3.3.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Epoch: 1
|
||||
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||
Patch1: valgrind-3.3.0-cachegrind-improvements.patch
|
||||
@ -10,6 +10,9 @@ Patch3: valgrind-3.3.0-power5+-6.patch
|
||||
Patch4: valgrind-3.3.0-openat.patch
|
||||
Patch5: valgrind-3.3.0-helgrind-p_b_w.patch
|
||||
Patch6: valgrind-3.3.0-glibc27-dlhack.patch
|
||||
Patch7: valgrind-3.3.0-glibc28.patch
|
||||
Patch8: valgrind-3.3.0-syscalls1.patch
|
||||
Patch9: valgrind-3.3.0-syscalls2.patch
|
||||
License: GPLv2
|
||||
URL: http://www.valgrind.org/
|
||||
Group: Development/Debuggers
|
||||
@ -19,7 +22,7 @@ Obsoletes: valgrind-callgrind
|
||||
# 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
|
||||
%endif
|
||||
BuildRequires: glibc-devel >= 2.7
|
||||
BuildRequires: glibc-devel >= 2.8
|
||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64
|
||||
%ifarch %{ix86}
|
||||
%define valarch x86
|
||||
@ -69,6 +72,9 @@ or valgrind plugins.
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
%ifarch x86_64 ppc64
|
||||
@ -83,7 +89,7 @@ touch libgcc/libgcc_s_32.a
|
||||
|
||||
# Force a specific set of default suppressions
|
||||
echo -n > default.supp
|
||||
for file in xfree-4.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.7.supp; do
|
||||
for file in xfree-4.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.8.supp; do
|
||||
cat $file >> default.supp
|
||||
done
|
||||
|
||||
@ -164,6 +170,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/pkgconfig/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 16 2008 Jakub Jelinek <jakub@redhat.com> 3.3.0-3
|
||||
- add suppressions for glibc 2.8
|
||||
- add a bunch of syscall wrappers (#441709)
|
||||
|
||||
* Mon Mar 3 2008 Jakub Jelinek <jakub@redhat.com> 3.3.0-2
|
||||
- add _dl_start suppression for ppc/ppc64
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user