]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 445032 valgrind/memcheck crash with SIGSEGV when SIGVTALRM timer used and libthr...
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 9 Nov 2021 22:11:15 +0000 (23:11 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 9 Nov 2021 22:17:40 +0000 (23:17 +0100)
The problem was that 'struct sigframe' has both a uContext struct
member and a puContext pointer to that struct. And puContext wasn't
being initialized to point to uContext.

It seems that the pthread sigreturn code uses puContext on i386.
amd64, with register arguments, didn't have this problem.

NEWS
coregrind/m_sigframe/sigframe-x86-freebsd.c

diff --git a/NEWS b/NEWS
index 888f07bb6b5dfd95428ae60c978f218d3ca175df..c6e9361a14228c917bfe0cae776367d676f7aeca 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,8 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 444571  PPC, fix the lxsibzx and lxsihzx so they only load their respective
         sized data.
 444836  PPC, pstq instruction for R=1 is not storing to the correct address.
+445032  valgrind/memcheck crash with SIGSEGV when SIGVTALRM timer used and
+        libthr.so associated
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index a1d8638e5aa78cf3cb03b95b391f1c5ae4990487..12f51e385cf3937b61b5acda011ad2820ec99f26 100644 (file)
@@ -304,6 +304,8 @@ static Addr build_sigframe(ThreadState *tst,
       err = 0;
    }
 
+   frame->puContext =  (Addr)&frame->uContext;
+
    synth_ucontext(tst->tid, siginfo, trapno, err, mask,
                   &frame->uContext, &frame->fpstate);