diff --git a/valgrind-3.17.0-vgdb-queued-signals.patch b/valgrind-3.17.0-vgdb-queued-signals.patch new file mode 100644 index 0000000..6e0da66 --- /dev/null +++ b/valgrind-3.17.0-vgdb-queued-signals.patch @@ -0,0 +1,15 @@ +index 389748960..07f3400f9 100644 +--- a/coregrind/vgdb-invoker-ptrace.c ++++ b/coregrind/vgdb-invoker-ptrace.c +@@ -300,6 +300,10 @@ Bool waitstopped (pid_t pid, int signal_expected, const char *msg) + + // realloc a bigger queue, and store new signal at the end. + // This is not very efficient but we assume not many sigs are queued. ++ if (signal_queue_sz >= 64) { ++ DEBUG(0, "too many queued signals while waiting for SIGSTOP\n"); ++ return False; ++ } + signal_queue_sz++; + signal_queue = vrealloc(signal_queue, + sizeof(siginfo_t) * signal_queue_sz); + diff --git a/valgrind.spec b/valgrind.spec index 05b1012..786375e 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -163,6 +163,9 @@ Patch17: valgrind-3.17.0_start.patch # KDE#440670 unhandled ppc64 syscalls 252 (statfs64 and 253 (fstatfs64) Patch18: valgrind-3.17.0-ppc64-statfs64.patch +# KDE#441474 vgdb might eat all memory while waiting for sigstop +Patch19: valgrind-3.17.0-vgdb-queued-signals.patch + BuildRequires: make BuildRequires: glibc-devel @@ -320,6 +323,7 @@ touch memcheck/tests/s390x/vistr.stdout.exp %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 %build # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto @@ -545,6 +549,9 @@ fi %endif %changelog +* Wed Aug 25 2021 Mark Wielaard +- Add valgrind-3.17.0-vgdb-queued-signals.patch + * Fri Aug 6 2021 Mark Wielaard - 3.17.0-11 - Add valgrind-3.17.0-ppc64-statfs64.patch