extra/valgrind to 3.13.0+292+2b0aa0a5-1

This commit is contained in:
Kevin Mihelich 2018-08-24 05:23:52 +00:00
parent f3c6b87684
commit 47ed95e449
6 changed files with 62 additions and 2354 deletions

View file

@ -11,49 +11,46 @@ buildarch=12
#noautobuild=1
pkgname=valgrind
pkgver=3.13.0
pkgrel=7
pkgver=3.13.0+292+2b0aa0a5
pkgrel=1
pkgdesc='Tool to help find memory-management problems in programs'
arch=('x86_64')
license=('GPL')
url='http://valgrind.org/'
depends=('glibc' 'perl')
makedepends=('gdb' 'openmpi')
makedepends=('gdb' 'openmpi' 'git' 'docbook-xml'
'docbook-xsl' 'docbook-sgml')
checkdepends=('procps-ng')
optdepends=('openmpi: MPI support')
provides=('valgrind-multilib')
replaces=('valgrind-multilib')
options=('!emptydirs' '!strip')
source=(https://sourceware.org/pub/valgrind/valgrind-${pkgver}.tar.bz2
valgrind-fix-xml-socket.patch
valgrind-3.13.0-test-fixes.patch
valgrind-3.13.0-amd64-eflags-tests.patch
valgrind-3.13.0-gdb-8-testfix.patch
_commit=2b0aa0a5b88f900e986a3360952fcb3d2513419d
source=(git+http://repo.or.cz/valgrind.git#commit=$_commit
valgrind-3.7.0-respect-flags.patch
valgrind-3.13.0-arm64-hwcap.patch)
md5sums=('817dd08f1e8a66336b9ff206400a5369'
'0b13c1a080260497e6159bef4401ac1a'
'183a51089321fcf117f0f723e8e1940a'
'47728e356bb24a34eae52e932dd56c9f'
'02ce4a4f96b2dd649b36a7b8b19bd9d1'
md5sums=('SKIP'
'470d9881870aacc210b7a6efb64cc9a9'
'b7c24e58fa058578c9bf6fef4ccdd47d')
sha512sums=('34e1013cd3815d30a459b86220e871bb0a6209cc9e87af968f347083693779f022e986f211bdf1a5184ad7370cde12ff2cfca8099967ff94732970bd04a97009'
'610c1e74a38d5e56a41eb59b25709ad40840e8c50d0d30bea20e9959cd65b99ae44626baf8a77505e5cd2ce70d120ae429a6861165546771395b00e534c3296b'
'1cff77e987e2d20ce1563c96d76431c60c142c42afa978e32d3a8c8dda17d0f3c1ba29fe3d0fcf0e7445fa5ca9558690ecdaad259fb9d23f435dcdc0baa9175d'
'5cb1643a8eab47ba2daa1438c50f1d29457d5aef69b6902fe3f1c72176ffa82d8048aac03ebc060ab6510cb8f59a9d41cfa1b80cf9661204b54120ee1961a607'
'd993b7af3debdbae1e0d997f8fe47a01f83975575a125bee425dfe6f474c6ec72a0c5252e88a762cc4e866dfcb2cb1bf5bab9fead8fb5393faf049fb4aefba4f'
sha512sums=('SKIP'
'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c'
'5af853399c6abdf8016fd1c2be854b3952b7d7e9ca16c870f84eed72e606e639d5f64de32e60105899f5201b53156380ae460111e05209e843301492742c9bfd')
pkgver() {
cd valgrind
local _basever=${pkgver%%+*}
local _count="$(git rev-list --count svn/VALGRIND_${_basever//./_}..master)"
printf "%s+%s+%s" $_basever $_count ${_commit:0:8}
}
prepare() {
cd ${pkgname}-${pkgver}
cd valgrind
patch -Np1 < ../valgrind-3.7.0-respect-flags.patch
patch -Np1 < ../valgrind-3.13.0-test-fixes.patch
patch -Np1 < ../valgrind-3.13.0-amd64-eflags-tests.patch
patch -Np1 < ../valgrind-3.13.0-gdb-8-testfix.patch
patch -Np1 < ../valgrind-fix-xml-socket.patch
patch -Np1 < ../valgrind-3.13.0-arm64-hwcap.patch
sed -i 's|sgml/docbook/xsl-stylesheets|xml/docbook/xsl-stylesheets-1.79.2|' docs/Makefile.am
autoreconf -ifv
}
build() {
@ -62,16 +59,17 @@ build() {
CFLAGS=${CFLAGS/-fstack-protector-strong -fno-plt/}
CXXFLAGS=${CXXFLAGS/-fstack-protector-strong -fno-plt/}
cd ${pkgname}-${pkgver}
cd valgrind
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--with-mpicc=mpicc
make
make -C docs man-pages
}
check() {
cd ${pkgname}-${pkgver}
cd valgrind
# Make sure a basic binary runs. There should be no errors.
./vg-in-place --error-exitcode=1 /bin/true
@ -110,9 +108,15 @@ check() {
}
package() {
cd ${pkgname}-${pkgver}
cd valgrind
make DESTDIR="${pkgdir}" install
find "${pkgdir}/usr/bin" -type f -executable -exec strip $STRIP_BINARIES {}+ || true
install -d "$pkgdir/usr/share/man/man1"
install -m644 docs/*.1 -t "$pkgdir/usr/share/man/man1"
if check_option 'debug' n; then
find "${pkgdir}/usr/bin" -type f -executable -exec strip $STRIP_BINARIES {} + || true
fi
}
# vim: ts=2 sw=2 et:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,31 @@
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
index 0f2ad8c51..407af7f76 100644
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
@@ -249,6 +249,7 @@ PRE(sys_rt_sigreturn)
PRE(sys_arch_prctl)
{
ThreadState* tst;
+ Bool known_option = True;
PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 );
vg_assert(VG_(is_valid_tid)(tid));
@@ -283,13 +284,16 @@ PRE(sys_arch_prctl)
POST_MEM_WRITE(ARG2, sizeof(unsigned long));
}
else {
- VG_(core_panic)("Unsupported arch_prctl option");
+ known_option = False;
}
/* Note; the Status writeback to guest state that happens after
this wrapper returns does not change guest_FS_CONST or guest_GS_CONST;
hence that direct assignment to the guest state is safe here. */
- SET_STATUS_Success( 0 );
+ if (known_option)
+ SET_STATUS_Success( 0 );
+ else
+ SET_STATUS_Failure( VKI_EINVAL );
}
// Parts of this are amd64-specific, but the *PEEK* cases are generic.

View file

@ -1,183 +0,0 @@
commit 21788250c945713fa25c16f2683e1f9cd0bb6ccf
Author: philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date: Sun Jun 25 12:40:53 2017 +0000
Fix some tests failure with GDB 8.0
At the beginning of a Valgrind gdbserver test,
2 messages are produced when launching the command
target remote | vgdb
A message output by vgdb:
relaying data between gdb and process <pid>
(this message is read by GDB from the vgdb pipe, and re-output
on stderr)
and a message produced by GDB:
Remote debugging using | ./vgdb
GDB 8.0 changes the order in which the above messages are output.
This causes 2 tests to fail, as the 'relaying' line appears
then in a part of the output deleted by a filter script.
To avoid this, change the filter scripts to always remove
this 'relaying line', which is not particularly interesting to check.
All the .exp files containining such a 'relaying' line are updated
accordingly.
This has been tested with various gdb versions (7.5, 7.7, 7.12, 8.0)
on amd64 and/or ppc64.
Thanks to Mark Wielaard, which helped to investigate this problem
by bisecting the GDB patches in GDB 8.0 causing this change of
behaviour.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16453 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
index 7177720..ed78cfe 100755
--- a/gdbserver_tests/filter_gdb
+++ b/gdbserver_tests/filter_gdb
@@ -72,7 +72,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
-e '/^Missing separate debuginfo/d' \
-e '/\/_exit.c: No such file or directory/d' \
-e '/^Try: zypper install -C/d' \
- -e 's/\(relaying data between gdb and process \)[0-9][0-9]*/\1..../' \
+ -e '/relaying data between gdb and process/d' \
-e 's/pid [0-9][0-9]*/pid ..../g' \
-e 's/Thread [0-9][0-9]*/Thread ..../g' \
-e '/\[Switching to Thread ....\]/d' \
diff --git a/gdbserver_tests/filter_vgdb b/gdbserver_tests/filter_vgdb
index 2442ec5..f8028a3 100755
--- a/gdbserver_tests/filter_vgdb
+++ b/gdbserver_tests/filter_vgdb
@@ -11,7 +11,7 @@ $dir/../tests/filter_addresses |
# pid
# gdb 7.2 sometimes tries to access address 0x0 (same as with standard gdbserver)
# filter a debian 6.0/ppc32 line
-sed -e 's/\(relaying data between gdb and process \)[0-9][0-9]*/\1..../' \
+sed -e '/relaying data between gdb and process/d' \
-e 's/\(sending command .* to pid \)[0-9][0-9]*/\1..../' \
-e '/Cannot access memory at address 0x......../d' \
-e '/^[1-9][0-9]* \.\.\/sysdeps\/powerpc\/powerpc32\/dl-start\.S: No such file or directory\./d' |
diff --git a/gdbserver_tests/hginfo.stderrB.exp b/gdbserver_tests/hginfo.stderrB.exp
index df47f11..669ff92 100644
--- a/gdbserver_tests/hginfo.stderrB.exp
+++ b/gdbserver_tests/hginfo.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
Lock ga 0x........ {
Address 0x........ is 0 bytes inside data symbol "mx"
diff --git a/gdbserver_tests/mcblocklistsearch.stderrB.exp b/gdbserver_tests/mcblocklistsearch.stderrB.exp
index 312d776..1313321 100644
--- a/gdbserver_tests/mcblocklistsearch.stderrB.exp
+++ b/gdbserver_tests/mcblocklistsearch.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
Breakpoint 1 at 0x........: file leak-tree.c, line 42.
Breakpoint 2 at 0x........: file leak-tree.c, line 67.
diff --git a/gdbserver_tests/mcbreak.stderrB.exp b/gdbserver_tests/mcbreak.stderrB.exp
index 65281d2..0f051d1 100644
--- a/gdbserver_tests/mcbreak.stderrB.exp
+++ b/gdbserver_tests/mcbreak.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
vgdb-error value changed from 999999 to 0
n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
diff --git a/gdbserver_tests/mcclean_after_fork.stderrB.exp b/gdbserver_tests/mcclean_after_fork.stderrB.exp
index 995b42f..e812b8e 100644
--- a/gdbserver_tests/mcclean_after_fork.stderrB.exp
+++ b/gdbserver_tests/mcclean_after_fork.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
monitor command request to kill this process
Remote connection closed
diff --git a/gdbserver_tests/mcinfcallWSRU.stderrB.exp b/gdbserver_tests/mcinfcallWSRU.stderrB.exp
index 7789123..a2f2b87 100644
--- a/gdbserver_tests/mcinfcallWSRU.stderrB.exp
+++ b/gdbserver_tests/mcinfcallWSRU.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
Breakpoint 1 at 0x........: file sleepers.c, line 74.
Continuing.
diff --git a/gdbserver_tests/mcleak.stderrB.exp b/gdbserver_tests/mcleak.stderrB.exp
index 7782119..7ed3920 100644
--- a/gdbserver_tests/mcleak.stderrB.exp
+++ b/gdbserver_tests/mcleak.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
10 bytes in 1 blocks are still reachable in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
diff --git a/gdbserver_tests/mcmain_pic.stderrB.exp b/gdbserver_tests/mcmain_pic.stderrB.exp
index c90e1fa..53ec0ce 100644
--- a/gdbserver_tests/mcmain_pic.stderrB.exp
+++ b/gdbserver_tests/mcmain_pic.stderrB.exp
@@ -1,2 +1 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
diff --git a/gdbserver_tests/mcvabits.stderrB.exp b/gdbserver_tests/mcvabits.stderrB.exp
index bdabb1e..f9ced7a 100644
--- a/gdbserver_tests/mcvabits.stderrB.exp
+++ b/gdbserver_tests/mcvabits.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
diff --git a/gdbserver_tests/mssnapshot.stderrB.exp b/gdbserver_tests/mssnapshot.stderrB.exp
index 8bee8fc..e419ce6 100644
--- a/gdbserver_tests/mssnapshot.stderrB.exp
+++ b/gdbserver_tests/mssnapshot.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
diff --git a/gdbserver_tests/nlgone_abrt.stderrB.exp b/gdbserver_tests/nlgone_abrt.stderrB.exp
index c8b2024..e69de29 100644
--- a/gdbserver_tests/nlgone_abrt.stderrB.exp
+++ b/gdbserver_tests/nlgone_abrt.stderrB.exp
@@ -1 +0,0 @@
-relaying data between gdb and process ....
diff --git a/gdbserver_tests/nlgone_exit.stderrB.exp b/gdbserver_tests/nlgone_exit.stderrB.exp
index c8b2024..e69de29 100644
--- a/gdbserver_tests/nlgone_exit.stderrB.exp
+++ b/gdbserver_tests/nlgone_exit.stderrB.exp
@@ -1 +0,0 @@
-relaying data between gdb and process ....
diff --git a/gdbserver_tests/nlgone_return.stderrB.exp b/gdbserver_tests/nlgone_return.stderrB.exp
index c8b2024..e69de29 100644
--- a/gdbserver_tests/nlgone_return.stderrB.exp
+++ b/gdbserver_tests/nlgone_return.stderrB.exp
@@ -1 +0,0 @@
-relaying data between gdb and process ....
diff --git a/gdbserver_tests/nlpasssigalrm.stderrB.exp b/gdbserver_tests/nlpasssigalrm.stderrB.exp
index c90e1fa..53ec0ce 100644
--- a/gdbserver_tests/nlpasssigalrm.stderrB.exp
+++ b/gdbserver_tests/nlpasssigalrm.stderrB.exp
@@ -1,2 +1 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
diff --git a/gdbserver_tests/nlself_invalidate.stderrB.exp b/gdbserver_tests/nlself_invalidate.stderrB.exp
index c8b2024..e69de29 100644
--- a/gdbserver_tests/nlself_invalidate.stderrB.exp
+++ b/gdbserver_tests/nlself_invalidate.stderrB.exp
@@ -1 +0,0 @@
-relaying data between gdb and process ....
diff --git a/gdbserver_tests/nlsigvgdb.stderrB.exp b/gdbserver_tests/nlsigvgdb.stderrB.exp
index 672fea5..ed5bb61 100644
--- a/gdbserver_tests/nlsigvgdb.stderrB.exp
+++ b/gdbserver_tests/nlsigvgdb.stderrB.exp
@@ -1,4 +1,3 @@
-relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
gdbserver: continuing in 5000 ms ...
gdbserver: continuing after wait ...

View file

@ -1,29 +0,0 @@
See:
https://bugs.gentoo.org/637488
https://bugs.kde.org/show_bug.cgi?id=387686
commit 2b5eab6a8db1b0487a3ad7fc4e7eeda6d3513626
Author: Mark Wielaard <mark@klomp.org>
Date: Thu Jun 29 15:26:30 2017 +0000
memcheck/tests: Use ucontext_t instead of struct ucontext
glibc 2.26 does not expose struct ucontext anymore.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16457
diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c
index a978fc2b0..7f97b90a5 100644
--- a/memcheck/tests/linux/stack_changes.c
+++ b/memcheck/tests/linux/stack_changes.c
@@ -10,7 +10,7 @@
// This test is checking the libc context calls (setcontext, etc.) and
// checks that Valgrind notices their stack changes properly.
-typedef struct ucontext mycontext;
+typedef ucontext_t mycontext;
mycontext ctx1, ctx2, oldc;
int count;

View file

@ -1,11 +0,0 @@
--- a/coregrind/m_libcprint.c
+++ b/coregrind/m_libcprint.c
@@ -526,7 +526,7 @@
break;
case VgLogTo_Socket:
- log_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
+ xml_fd = prepare_sink_socket(VG_(clo_xml_fname_unexpanded),
&VG_(xml_output_sink), True);
break;
}