From 1a8da4dddbe3b5a970e116e13c579a6c02eead4b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 13 Dec 2018 00:31:56 +0100 Subject: [PATCH] Add valgrind-3.14.0-sigkill.patch --- valgrind-3.14.0-sigkill.patch | 244 ++++++++++++++++++++++++++++++++++ valgrind.spec | 6 + 2 files changed, 250 insertions(+) create mode 100644 valgrind-3.14.0-sigkill.patch diff --git a/valgrind-3.14.0-sigkill.patch b/valgrind-3.14.0-sigkill.patch new file mode 100644 index 0000000..27ef411 --- /dev/null +++ b/valgrind-3.14.0-sigkill.patch @@ -0,0 +1,244 @@ +commit 0c701ba2a4b10a5f6f3fae31cb0ec6ca034d51d9 +Author: Mark Wielaard +Date: Fri Dec 7 14:01:20 2018 +0100 + + Fix sigkill.stderr.exp for glibc-2.28. + + glibc 2.28 filters out some bad signal numbers and returns + Invalid argument instead of passing such bad signal numbers + the kernel sigaction syscall. So we won't see such bad signal + numbers and won't print "bad signal number" ourselves. + + Add a new memcheck/tests/sigkill.stderr.exp-glibc-2.28 to catch + this case. + +diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am +index 76e0e90..2af4dd1 100644 +--- a/memcheck/tests/Makefile.am ++++ b/memcheck/tests/Makefile.am +@@ -260,7 +260,8 @@ EXTRA_DIST = \ + sh-mem-random.stdout.exp sh-mem-random.vgtest \ + sigaltstack.stderr.exp sigaltstack.vgtest \ + sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-mips32 \ +- sigkill.stderr.exp-solaris sigkill.vgtest \ ++ sigkill.stderr.exp-solaris \ ++ sigkill.stderr.exp-glibc-2.28 sigkill.vgtest \ + signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ + sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ + static_malloc.stderr.exp static_malloc.vgtest \ +diff --git a/memcheck/tests/sigkill.stderr.exp-glibc-2.28 b/memcheck/tests/sigkill.stderr.exp-glibc-2.28 +new file mode 100644 +index 0000000..0e5f0cb +--- /dev/null ++++ b/memcheck/tests/sigkill.stderr.exp-glibc-2.28 +@@ -0,0 +1,197 @@ ++ ++setting signal 1: Success ++getting signal 1: Success ++ ++setting signal 2: Success ++getting signal 2: Success ++ ++setting signal 3: Success ++getting signal 3: Success ++ ++setting signal 4: Success ++getting signal 4: Success ++ ++setting signal 5: Success ++getting signal 5: Success ++ ++setting signal 6: Success ++getting signal 6: Success ++ ++setting signal 7: Success ++getting signal 7: Success ++ ++setting signal 8: Success ++getting signal 8: Success ++ ++setting signal 9: Warning: ignored attempt to set SIGKILL handler in sigaction(); ++ the SIGKILL signal is uncatchable ++Invalid argument ++getting signal 9: Success ++ ++setting signal 10: Success ++getting signal 10: Success ++ ++setting signal 11: Success ++getting signal 11: Success ++ ++setting signal 12: Success ++getting signal 12: Success ++ ++setting signal 13: Success ++getting signal 13: Success ++ ++setting signal 14: Success ++getting signal 14: Success ++ ++setting signal 15: Success ++getting signal 15: Success ++ ++setting signal 16: Success ++getting signal 16: Success ++ ++setting signal 17: Success ++getting signal 17: Success ++ ++setting signal 18: Success ++getting signal 18: Success ++ ++setting signal 19: Warning: ignored attempt to set SIGSTOP handler in sigaction(); ++ the SIGSTOP signal is uncatchable ++Invalid argument ++getting signal 19: Success ++ ++setting signal 20: Success ++getting signal 20: Success ++ ++setting signal 21: Success ++getting signal 21: Success ++ ++setting signal 22: Success ++getting signal 22: Success ++ ++setting signal 23: Success ++getting signal 23: Success ++ ++setting signal 24: Success ++getting signal 24: Success ++ ++setting signal 25: Success ++getting signal 25: Success ++ ++setting signal 26: Success ++getting signal 26: Success ++ ++setting signal 27: Success ++getting signal 27: Success ++ ++setting signal 28: Success ++getting signal 28: Success ++ ++setting signal 29: Success ++getting signal 29: Success ++ ++setting signal 30: Success ++getting signal 30: Success ++ ++setting signal 31: Success ++getting signal 31: Success ++ ++setting signal 34: Success ++getting signal 34: Success ++ ++setting signal 35: Success ++getting signal 35: Success ++ ++setting signal 36: Success ++getting signal 36: Success ++ ++setting signal 37: Success ++getting signal 37: Success ++ ++setting signal 38: Success ++getting signal 38: Success ++ ++setting signal 39: Success ++getting signal 39: Success ++ ++setting signal 40: Success ++getting signal 40: Success ++ ++setting signal 41: Success ++getting signal 41: Success ++ ++setting signal 42: Success ++getting signal 42: Success ++ ++setting signal 43: Success ++getting signal 43: Success ++ ++setting signal 44: Success ++getting signal 44: Success ++ ++setting signal 45: Success ++getting signal 45: Success ++ ++setting signal 46: Success ++getting signal 46: Success ++ ++setting signal 47: Success ++getting signal 47: Success ++ ++setting signal 48: Success ++getting signal 48: Success ++ ++setting signal 49: Success ++getting signal 49: Success ++ ++setting signal 50: Success ++getting signal 50: Success ++ ++setting signal 51: Success ++getting signal 51: Success ++ ++setting signal 52: Success ++getting signal 52: Success ++ ++setting signal 53: Success ++getting signal 53: Success ++ ++setting signal 54: Success ++getting signal 54: Success ++ ++setting signal 55: Success ++getting signal 55: Success ++ ++setting signal 56: Success ++getting signal 56: Success ++ ++setting signal 57: Success ++getting signal 57: Success ++ ++setting signal 58: Success ++getting signal 58: Success ++ ++setting signal 59: Success ++getting signal 59: Success ++ ++setting signal 60: Success ++getting signal 60: Success ++ ++setting signal 61: Success ++getting signal 61: Success ++ ++setting signal 62: Success ++getting signal 62: Success ++ ++setting signal 65: Invalid argument ++getting signal 65: Invalid argument ++ ++ ++HEAP SUMMARY: ++ in use at exit: ... bytes in ... blocks ++ total heap usage: ... allocs, ... frees, ... bytes allocated ++ ++For a detailed leak analysis, rerun with: --leak-check=full ++ ++For counts of detected and suppressed errors, rerun with: -v ++ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) +diff -ur valgrind-3.14.0.orig/memcheck/tests/Makefile.in valgrind-3.14.0/memcheck/tests/Makefile.in +--- valgrind-3.14.0.orig/memcheck/tests/Makefile.in 2018-12-13 00:30:45.013839247 +0100 ++++ valgrind-3.14.0/memcheck/tests/Makefile.in 2018-12-13 00:30:54.242636002 +0100 +@@ -1573,7 +1573,8 @@ + sh-mem-random.stdout.exp sh-mem-random.vgtest \ + sigaltstack.stderr.exp sigaltstack.vgtest \ + sigkill.stderr.exp sigkill.stderr.exp-darwin sigkill.stderr.exp-mips32 \ +- sigkill.stderr.exp-solaris sigkill.vgtest \ ++ sigkill.stderr.exp-solaris \ ++ sigkill.stderr.exp-glibc-2.28 sigkill.vgtest \ + signal2.stderr.exp signal2.stdout.exp signal2.vgtest \ + sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \ + static_malloc.stderr.exp static_malloc.vgtest \ diff --git a/valgrind.spec b/valgrind.spec index 4750e4d..9e4147e 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -148,6 +148,10 @@ Patch25: valgrind-3.14.0-undef_malloc_args.patch # KDE#401822 none/tests/ppc64/jm-vmx fails and produces assembler warnings Patch26: valgrind-3.14.0-jm-vmx-constraints.patch +# commit 0c701ba2a Fix sigkill.stderr.exp for glibc-2.28. +Patch27: valgrind-3.14.0-sigkill.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 @@ -306,6 +310,7 @@ Valgrind User Manual for details. %patch24 -p1 %patch25 -p1 %patch26 -p1 +%patch27 -p1 %build CC=gcc @@ -550,6 +555,7 @@ fi - Add valgrind-3.14.0-set_AV_CR6.patch - Add valgrind-3.14.0-undef_malloc_args.patch - Add valgrind-3.14.0-jm-vmx-constraints.patch +- Add valgrind-3.14.0-sigkill.patch * Sat Dec 1 2018 Mark Wielaard - 3.14.0.5 - Add valgrind-3.14.0-wcsncmp.patch (#1645971)