OBS User unknown 2009-01-23 01:28:09 +00:00 committed by Git OBS Bridge
parent 7e3bf70d68
commit c128f17974
9 changed files with 17 additions and 452 deletions

View File

@ -1,58 +0,0 @@
--- docs/xml/manual-core.xml
+++ docs/xml/manual-core.xml
@@ -1255,7 +1255,9 @@ processed earlier; for example, options
precedence over those in
<computeroutput>~/.valgrindrc</computeroutput>. The first two
are particularly useful for setting the default tool to
-use.</para>
+use. Please note that the .valgrindrc file is ignored if
+it is world writeable or not owned by the current user.
+</para>
<para>Any tool-specific options put in
<computeroutput>$VALGRIND_OPTS</computeroutput> or the
--- coregrind/m_commandline.c
+++ coregrind/m_commandline.c
@@ -57,23 +57,33 @@ static HChar* read_dot_valgrindrc ( HCha
{
Int n;
SysRes fd;
- Int size;
+ struct vki_stat stat_buf;
HChar* f_clo = NULL;
HChar filename[VKI_PATH_MAX];
VG_(snprintf)(filename, VKI_PATH_MAX, "%s/.valgrindrc",
( NULL == dir ? "" : dir ) );
fd = VG_(open)(filename, 0, VKI_S_IRUSR);
+
if ( !fd.isError ) {
- size = VG_(fsize)(fd.res);
- if (size > 0) {
- f_clo = VG_(malloc)(size+1);
- vg_assert(f_clo);
- n = VG_(read)(fd.res, f_clo, size);
- if (n == -1) n = 0;
- vg_assert(n >= 0 && n <= size+1);
- f_clo[n] = '\0';
+ Int res = VG_(fstat)( fd.res, &stat_buf );
+ // Ignore if not owned by current user or world writeable (CVE-2008-4865)
+ if (!res && stat_buf.st_uid == VG_(geteuid)()
+ && (!(stat_buf.st_mode & VKI_S_IWOTH))) {
+ if ( stat_buf.st_size > 0) {
+ f_clo = VG_(malloc)(stat_buf.st_size+1);
+ vg_assert(f_clo);
+ n = VG_(read)(fd.res, f_clo, stat_buf.st_size);
+ if (n == -1) n = 0;
+ vg_assert(n >= 0 && n <= stat_buf.st_size+1);
+ f_clo[n] = '\0';
+ }
}
+ else
+ VG_(message)(Vg_UserMsg,
+ "%s was not read as it is world writeable or not owned by the "
+ "current user", filename);
+
VG_(close)(fd.res);
}
return f_clo;

View File

@ -1,33 +0,0 @@
--- coregrind/m_syswrap/syswrap-ppc64-linux.c
+++ coregrind/m_syswrap/syswrap-ppc64-linux.c
@@ -430,6 +430,7 @@ DECL_TEMPLATE(ppc64_linux, sys_clone);
//zz DECL_TEMPLATE(ppc64_linux, sys_sigreturn);
DECL_TEMPLATE(ppc64_linux, sys_rt_sigreturn);
//zz DECL_TEMPLATE(ppc64_linux, sys_sigaction);
+DECL_TEMPLATE(ppc64_linux, sys_fadvise64);
PRE(sys_socketcall)
{
@@ -1041,6 +1042,13 @@ PRE(sys_rt_sigreturn)
*flags |= SfPollAfter;
}
+PRE(sys_fadvise64)
+{
+ PRINT("sys_fadvise64 ( %d, %lld, %llu, %d )", ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(long, "fadvise64",
+ int, fd, vki_loff_t, offset, vki_size_t, len, int, advice);
+}
+
//zz /* Convert from non-RT to RT sigset_t's */
//zz static
//zz void convert_sigset_to_rt(const vki_old_sigset_t *oldset, vki_sigset_t *set)
@@ -1405,7 +1413,7 @@ const SyscallTableEntry ML_(syscall_tabl
LINX_(__NR_io_submit, sys_io_submit), // 230
LINXY(__NR_io_cancel, sys_io_cancel), // 231
LINX_(__NR_set_tid_address, sys_set_tid_address), // 232
-// _____(__NR_fadvise64, sys_fadvise64), // 233
+ PLAX_(__NR_fadvise64, sys_fadvise64), // 233
LINX_(__NR_exit_group, sys_exit_group), // 234
// _____(__NR_lookup_dcookie, sys_lookup_dcookie), // 235

View File

@ -1,140 +0,0 @@
--- configure.in
+++ configure.in
@@ -479,6 +479,16 @@ AC_EGREP_CPP([GLIBC_28], [
],
libc="2.8")
+AC_EGREP_CPP([GLIBC_29], [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
+ GLIBC_29
+ #endif
+#endif
+],
+libc="2.9")
+
AC_EGREP_CPP([AIX5_LIBC], [
#include <standards.h>
#if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
@@ -535,6 +545,12 @@ case "${libc}" in
DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}"
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
;;
+ 2.9)
+ AC_MSG_RESULT(2.9 family)
+ AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x])
+ DEFAULT_SUPP="glibc-2.9.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])
@@ -543,7 +559,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.9])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 libc])
;;
esac
--- glibc-2.9.supp
+++ glibc-2.9.supp
@@ -0,0 +1,95 @@
+
+# Errors to suppress by default with glibc 2.9.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-hack3-cond-1
+ Memcheck:Cond
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+}
+{
+ dl-hack3-cond-2
+ Memcheck:Cond
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/libc-2.9*.so*
+}
+{
+ dl-hack3-cond-3
+ Memcheck:Cond
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/libc-2.9*.so*
+ obj:/lib*/libc-2.9*.so*
+}
+{
+ dl-hack3-cond-4
+ Memcheck:Cond
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/libdl-2.9*.so*
+}
+
+{
+ dl-hack4-64bit-addr-1
+ Memcheck:Addr8
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+}
+{
+ dl-hack4-64bit-addr-2
+ Memcheck:Addr8
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/libc-2.9*.so*
+}
+{
+ dl-hack4-64bit-addr-3
+ Memcheck:Addr8
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/ld-2.9*.so*
+ obj:/lib*/libdl-2.9*.so*
+}
+
+{
+ dl-hack5-32bit-addr-1
+ Memcheck:Addr4
+ obj:/lib/ld-2.9*.so
+ obj:/lib/ld-2.9*.so
+ obj:/lib/ld-2.9*.so
+}
+{
+ dl-hack5-32bit-addr-3
+ Memcheck:Addr4
+ obj:/lib/ld-2.9*.so
+ obj:/lib/ld-2.9*.so
+ obj:/lib/libdl-2.9*.so*
+}
+{
+ dl-hack5-32bit-addr-4
+ Memcheck:Addr4
+ obj:/lib/ld-2.9*.so
+ obj:/lib/libdl-2.9*.so*
+ obj:/lib/ld-2.9*.so
+}

View File

@ -1,182 +0,0 @@
------------------------------------------------------------------------
r8730 | sewardj | 2008-11-05 12:20:59 +0100 (Mi, 05 Nov 2008) | 3 lines
Support sys_pipe2 on {amd64,x86}-linux. Also, update syscall numbers
for all supported Linuxes to those in linux-2.6.28-rc3.
------------------------------------------------------------------------
Index: include/vki/vki-scnums-amd64-linux.h
===================================================================
--- include/vki/vki-scnums-amd64-linux.h (revision 8729)
+++ include/vki/vki-scnums-amd64-linux.h (revision 8730)
@@ -369,6 +369,13 @@
#define __NR_fallocate 285
#define __NR_timerfd_settime 286
#define __NR_timerfd_gettime 287
+#define __NR_paccept 288
+#define __NR_signalfd4 289
+#define __NR_eventfd2 290
+#define __NR_epoll_create1 291
+#define __NR_dup3 292
+#define __NR_pipe2 293
+#define __NR_inotify_init1 294
#endif /* __VKI_SCNUMS_AMD64_LINUX_H */
Index: include/vki/vki-scnums-x86-linux.h
===================================================================
--- include/vki/vki-scnums-x86-linux.h (revision 8729)
+++ include/vki/vki-scnums-x86-linux.h (revision 8730)
@@ -361,6 +361,12 @@
#define __NR_fallocate 324
#define __NR_timerfd_settime 325
#define __NR_timerfd_gettime 326
+#define __NR_signalfd4 327
+#define __NR_eventfd2 328
+#define __NR_epoll_create1 329
+#define __NR_dup3 330
+#define __NR_pipe2 331
+#define __NR_inotify_init1 332
#endif /* __VKI_SCNUMS_X86_LINUX_H */
Index: include/vki/vki-scnums-ppc32-linux.h
===================================================================
--- include/vki/vki-scnums-ppc32-linux.h (revision 8729)
+++ include/vki/vki-scnums-ppc32-linux.h (revision 8730)
@@ -355,6 +355,12 @@
#define __NR_subpage_prot 310
#define __NR_timerfd_settime 311
#define __NR_timerfd_gettime 312
+#define __NR_signalfd4 313
+#define __NR_eventfd2 314
+#define __NR_epoll_create1 315
+#define __NR_dup3 316
+#define __NR_pipe2 317
+#define __NR_inotify_init1 318
#endif /* __VKI_SCNUMS_PPC32_LINUX_H */
Index: include/vki/vki-scnums-ppc64-linux.h
===================================================================
--- include/vki/vki-scnums-ppc64-linux.h (revision 8729)
+++ include/vki/vki-scnums-ppc64-linux.h (revision 8730)
@@ -347,6 +347,12 @@
#define __NR_subpage_prot 310
#define __NR_timerfd_settime 311
#define __NR_timerfd_gettime 312
+#define __NR_signalfd4 313
+#define __NR_eventfd2 314
+#define __NR_epoll_create1 315
+#define __NR_dup3 316
+#define __NR_pipe2 317
+#define __NR_inotify_init1 318
#endif /* __VKI_SCNUMS_PPC64_LINUX_H */
Index: coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-linux.c (revision 8729)
+++ coregrind/m_syswrap/syswrap-linux.c (revision 8730)
@@ -2235,12 +2235,38 @@ PRE(sys_pipe)
POST(sys_pipe)
{
Int *p = (Int *)ARG1;
-
if (!ML_(fd_allowed)(p[0], "pipe", tid, True) ||
!ML_(fd_allowed)(p[1], "pipe", tid, True)) {
VG_(close)(p[0]);
VG_(close)(p[1]);
SET_STATUS_Failure( VKI_EMFILE );
+ } else {
+ POST_MEM_WRITE( ARG1, 2*sizeof(int) );
+ if (VG_(clo_track_fds)) {
+ ML_(record_fd_open_nameless)(tid, p[0]);
+ ML_(record_fd_open_nameless)(tid, p[1]);
+ }
+ }
+}
+
+/* pipe2 (a kernel 2.6.twentysomething invention) is like pipe, except
+ there's a second arg containing flags to be applied to the new file
+ descriptors. It hardly seems worth the effort to factor out the
+ duplicated code, hence: */
+PRE(sys_pipe2)
+{
+ PRINT("sys_pipe2 ( %#lx, %#lx )", ARG1, ARG2);
+ PRE_REG_READ2(int, "pipe", int *, filedes, long, flags);
+ PRE_MEM_WRITE( "pipe2(filedes)", ARG1, 2*sizeof(int) );
+}
+POST(sys_pipe2)
+{
+ Int *p = (Int *)ARG1;
+ if (!ML_(fd_allowed)(p[0], "pipe2", tid, True) ||
+ !ML_(fd_allowed)(p[1], "pipe2", tid, True)) {
+ VG_(close)(p[0]);
+ VG_(close)(p[1]);
+ SET_STATUS_Failure( VKI_EMFILE );
} else {
POST_MEM_WRITE( ARG1, 2*sizeof(int) );
if (VG_(clo_track_fds)) {
Index: coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- coregrind/m_syswrap/priv_syswrap-linux.h (revision 8729)
+++ coregrind/m_syswrap/priv_syswrap-linux.h (revision 8730)
@@ -206,6 +206,7 @@ DECL_TEMPLATE(linux, sys_sched_getaffini
// Also, some archs on Linux do not match the generic wrapper for sys_pipe.
DECL_TEMPLATE(linux, sys_munlockall);
DECL_TEMPLATE(linux, sys_pipe);
+DECL_TEMPLATE(linux, sys_pipe2);
DECL_TEMPLATE(linux, sys_quotactl);
DECL_TEMPLATE(linux, sys_waitid);
Index: coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-amd64-linux.c (revision 8729)
+++ coregrind/m_syswrap/syswrap-amd64-linux.c (revision 8730)
@@ -1350,14 +1350,24 @@ 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_create, sys_timerfd_create), // 283
LINX_(__NR_eventfd, sys_eventfd), // 284
+
// LINX_(__NR_fallocate, sys_ni_syscall), // 285
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 286
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 287
+ // (__NR_paccept, sys_ni_syscall) // 288
+ // (__NR_signalfd4, sys_ni_syscall) // 289
+
+ // (__NR_eventfd2, sys_ni_syscall) // 290
+ // (__NR_epoll_create1, sys_ni_syscall) // 291
+ // (__NR_dup3, sys_ni_syscall) // 292
+ LINXY(__NR_pipe2, sys_pipe2) // 293
+ // (__NR_inotify_init1, sys_ni_syscall) // 294
};
const UInt ML_(syscall_table_size) =
Index: coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- coregrind/m_syswrap/syswrap-x86-linux.c (revision 8729)
+++ coregrind/m_syswrap/syswrap-x86-linux.c (revision 8730)
@@ -2231,8 +2231,16 @@ const SyscallTableEntry ML_(syscall_tabl
LINXY(__NR_timerfd_create, sys_timerfd_create), // 322
LINX_(__NR_eventfd, sys_eventfd), // 323
// LINX_(__NR_fallocate, sys_ni_syscall), // 324
+
LINXY(__NR_timerfd_settime, sys_timerfd_settime), // 325
LINXY(__NR_timerfd_gettime, sys_timerfd_gettime), // 326
+ // (__NR_signalfd4, sys_ni_syscall) // 327
+ // (__NR_eventfd2, sys_ni_syscall) // 328
+ // (__NR_epoll_create1, sys_ni_syscall) // 329
+
+ // (__NR_dup3, sys_ni_syscall) // 330
+ LINXY(__NR_pipe2, sys_pipe2) // 331
+ // (__NR_inotify_init1, sys_ni_syscall) // 332
};
const UInt ML_(syscall_table_size) =

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:95b7b4d815bd479332637c93e69ec24167cd28d4f9d9f9b718e1b091bb88aafa
size 4544805

3
valgrind-3.4.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5ea4ae5b1ef9fca677a38959060a9acb70b38540721c8bf5c73d09a265f9f74
size 5175209

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 23 01:52:58 CET 2009 - dmueller@suse.de
- update to 3.4.0:
* http://www.valgrind.org/docs/manual/dist.news.html
-------------------------------------------------------------------
Sun Nov 23 00:45:36 CET 2008 - dmueller@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package valgrind (Version 3.3.1)
# spec file for package valgrind (Version 3.4.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,19 +27,14 @@ License: GPL v2 only
Group: Development/Tools/Debuggers
Summary: Valgrind Suite of Tools for Debugging and Profiling
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 3.3.1
Release: 33
Version: 3.4.0
Release: 1
Source0: %{name}-%{version}.tar.bz2
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_2_1 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH > 3_2_BRANCH.diff
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_2_1 svn://svn.valgrind.org/vex/branches/VEX_3_2_BRANCH > VEX_3_2_BRANCH.diff
Patch8: jit-runtime-support.diff
Patch9: deprecated.diff
Patch10: update-suppressions.diff
Patch12: xcb-update.diff
Patch13: fadvice64.diff
Patch14: r8730.diff
Patch15: cve-2008-4865.diff
Patch16: glibc-2.9-support.diff
Provides: callgrind = %version
Obsoletes: callgrind < %version
ExclusiveArch: %ix86 x86_64 ppc ppc64
@ -122,14 +117,8 @@ Authors:
%setup -q -n %{name}-%{version}
cd VEX
cd ..
%patch8
#%patch8
%patch9
%patch10
%patch12
%patch13
%patch14
%patch15
%patch16
%build
export CFLAGS="$RPM_OPT_FLAGS"
@ -159,6 +148,9 @@ mv $RPM_BUILD_ROOT/usr/share/doc/valgrind $RPM_BUILD_ROOT/usr/share/doc/packages
%_libdir/valgrind/*/*.a
%changelog
* Fri Jan 23 2009 dmueller@suse.de
- update to 3.4.0:
* http://www.valgrind.org/docs/manual/dist.news.html
* Sun Nov 23 2008 dmueller@suse.de
- update suppressions
* Thu Nov 20 2008 dmueller@suse.de

View File

@ -1,20 +0,0 @@
--- xfree-4.supp
+++ xfree-4.supp
@@ -136,7 +136,7 @@
struct with uninitialized paddings - libxcb
Memcheck:Param
writev(vector[...])
- obj:/lib*/libc-2.6*.so
+ obj:/lib*/*.so
obj:/usr/lib*/libxcb.so.1.0.0
obj:/usr/lib*/libxcb.so.1.0.0
fun:xcb_send_request
@@ -147,7 +147,7 @@
struct with uninitialized paddings - libxcb
Memcheck:Param
writev(vector[...])
- obj:/lib*/libc-2.6*.so
+ obj:/lib*/*.so
obj:/usr/lib*/libxcb.so.1.0.0
obj:/usr/lib*/libxcb.so.1.0.0
obj:/usr/lib*/libxcb.so.1.0.0