]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
dhat is broken on x86 (32bit)
authorMark Wielaard <mark@klomp.org>
Tue, 9 Apr 2019 23:22:37 +0000 (01:22 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 10 Apr 2019 15:06:55 +0000 (17:06 +0200)
dhat will crash on x86 (32bit) because it doesn't handle Vg_CoreClientReq
in its track_post_mem_write.

dh_handle_noninsn_write will be called with Vg_CoreClientReq during
shutdown when trying to setup an argument for the freeres_wrapper().
On other architectures this will be done through a register, but on
x86 we setup the argument on the stack. See final_tidyup () in
coregrind/m_main.c.

Just handle it like a syscall memory argument write.

https://bugs.kde.org/show_bug.cgi?id=406354

NEWS
dhat/dh_main.c

diff --git a/NEWS b/NEWS
index 2cc8d2013a7434cdfc7713f44672342931d91a30..6f420cab41755711bbacaea2e8f8f442205d0cf1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -147,6 +147,7 @@ where XXXXXX is the bug number as listed below.
 406198  none/tests/ppc64/test_isa_3_0_other test sporadically including CA
         bit in output.
 406352  cachegrind/callgrind fails ann tests because of missing a.c
+406354  dhat is broken on x86 (32bit)
 406360  memcheck/tests/libstdc++.supp needs more supression variants
 
 n-i-bz  add syswrap for PTRACE_GET|SET_THREAD_AREA on amd64.
index 47a9327bd78c3597738f63c8a5fff227d877591b..a93332884a653b75b5e79749f9316b4a1a172c3c 100644 (file)
@@ -794,6 +794,7 @@ void dh_handle_noninsn_write ( CorePart part, ThreadId tid,
 {
    switch (part) {
       case Vg_CoreSysCall:
+      case Vg_CoreClientReq:
          dh_handle_write(base, size);
          break;
       case Vg_CoreSignal: