ba355a609a
0001-Prepare-NEWS-for-branch-3.23-fixes.patch 0002-486180-MIPS-VexGuestArchState-has-no-member-named-gu.patch 0003-Bug-486293-memccpy-false-positives.patch 0004-Bug-486569-linux-inotify_init-syscall-wrapper-missin.patch 0005-aarch64-frinta-and-frinta-vector-instructions.patch 0006-mips-skip-using-shared-syscall-numbers-for-mips32.patch 0007-Fix-uninitialized-err-in-handle_extension.patch 0008-Avoid-use-of-guest_IP_AT_SYSCALL-in-handle_extension.patch 0009-s390x-Minor-fixes-in-extension-s390x.c.patch 0010-Bug-453044-gbserver_tests-failures-in-aarch64.patch 0011-Linux-regtest-reallocarray-needs-malloc.h.patch 0012-Bug-487439-SIGILL-in-JDK11-JDK17.patch 0013-Don-t-leave-fds-created-with-log-file-xml-file-or-lo.patch 0014-Close-both-internal-pipe-fds-after-VG_-fork-in-paren.patch 0015-Don-t-allow-programs-calling-fnctl-on-valgrind-s-own.patch 0016-mips-skip-using-shared-syscall-numbers-for-mips64.patch 0017-gdbserver_tests-filters-remove-python-rpm-module-loa.patch 0018-Implement-VMOVQ-xmm1-xmm2-m64.patch 0019-arm64-Fix-fcvtas-instruction.patch 0020-gdbserver_tests-filters-remove-more-verbose-python-r.patch 0021-Avoid-dev-inode-check-on-btrfs-with-sanity-level-3.patch Resolves: #RHEL-46588 Add valgrind 3.23 stable branch fixes (rhel-10-beta)
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 468933f9765449c1e353c38e88555a2f1603b9ce Mon Sep 17 00:00:00 2001
|
|
From: Andreas Arnez <arnez@linux.ibm.com>
|
|
Date: Wed, 15 May 2024 14:32:42 +0200
|
|
Subject: [PATCH 07/11] Fix uninitialized `err' in handle_extension()
|
|
|
|
In handle_extension(), in the case of a second return from SCHEDSETJMP the
|
|
variable `err' would be used uninitialized. Fix this by avoiding any
|
|
access to `err' in this case.
|
|
|
|
(cherry picked from commit 94c2e5c6be23c6323f24deacdad5f98fb9f0b1c2)
|
|
---
|
|
coregrind/m_scheduler/scheduler.c | 10 ++++------
|
|
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c
|
|
index fc8cf7c9cb1d..29751bb28283 100644
|
|
--- a/coregrind/m_scheduler/scheduler.c
|
|
+++ b/coregrind/m_scheduler/scheduler.c
|
|
@@ -1233,7 +1233,10 @@ static void handle_extension(ThreadId tid)
|
|
SCHEDSETJMP(tid, jumped, err = VG_(client_extension)(tid));
|
|
vg_assert(VG_(is_running_thread)(tid));
|
|
|
|
- if (err != ExtErr_OK) {
|
|
+ if (jumped != (UWord)0) {
|
|
+ block_signals();
|
|
+ VG_(poll_signals)(tid);
|
|
+ } else if (err != ExtErr_OK) {
|
|
ThreadState* tst = VG_(get_ThreadState)(tid);
|
|
Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;
|
|
switch (err) {
|
|
@@ -1244,11 +1247,6 @@ static void handle_extension(ThreadId tid)
|
|
VG_(core_panic)("scheduler: bad return code from extension");
|
|
}
|
|
}
|
|
-
|
|
- if (jumped != (UWord)0) {
|
|
- block_signals();
|
|
- VG_(poll_signals)(tid);
|
|
- }
|
|
}
|
|
|
|
/* tid just requested a jump to the noredir version of its current
|
|
--
|
|
2.45.2
|
|
|