diff --git a/valgrind-3.16.1-epoll.patch b/valgrind-3.16.1-epoll.patch index 5bb1808..c6a0411 100644 --- a/valgrind-3.16.1-epoll.patch +++ b/valgrind-3.16.1-epoll.patch @@ -84,3 +84,34 @@ index 5b5b7eee6..929a4d9af 100644 } PRE(sys_eventfd) +commit b74f9f23c8758c77367f18368ea95baa858544cb +Author: Mark Wielaard +Date: Tue Aug 18 23:58:55 2020 +0200 + + Fix epoll_ctl setting of array event and data fields. + + Fix for https://bugs.kde.org/show_bug.cgi?id=422623 in commit ecf5ba119 + epoll_ctl warns for uninitialized padding on non-amd64 64bit arches + contained a bug. A pointer to an array is not a pointer to a pointer to + an array. Found by a Fedora user: + https://bugzilla.redhat.com/show_bug.cgi?id=1844778#c10 + +diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c +index 0850487e9..3f488795a 100644 +--- a/coregrind/m_syswrap/syswrap-linux.c ++++ b/coregrind/m_syswrap/syswrap-linux.c +@@ -2115,11 +2115,11 @@ static void epoll_post_helper ( ThreadId tid, SyscallArgs* arrghs, + vg_assert(SUCCESS); + if (RES > 0) { + Int i; +- struct vki_epoll_event **events = (struct vki_epoll_event**)(Addr)ARG2; ++ struct vki_epoll_event *events = (struct vki_epoll_event*)(Addr)ARG2; + for (i = 0; i < RES; i++) { + /* Assume both events and data are set (data is user space only). */ +- POST_FIELD_WRITE(events[i]->events); +- POST_FIELD_WRITE(events[i]->data); ++ POST_FIELD_WRITE(events[i].events); ++ POST_FIELD_WRITE(events[i].data); + } + } + } diff --git a/valgrind.spec b/valgrind.spec index 3ea81e5..a40ae9d 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -3,7 +3,7 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind Version: 3.16.1 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -464,6 +464,9 @@ fi %endif %changelog +* Tue Aug 18 2020 Mark Wielaard - 3.16.1-5 +- Update valgrind-3.16.1-epoll.patch + * Mon Jul 27 2020 Mark Wielaard - 3.16.1-4 - Add valgrind-3.16.1-REX-prefix-JMP.patch - Add valgrind-3.16.1-epoll.patch