|
From: Paul F. <pa...@so...> - 2023-02-08 21:58:10
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6e4eb0b674db465c9c332ec72b5c7f5202de7d71 commit 6e4eb0b674db465c9c332ec72b5c7f5202de7d71 Author: Paul Floyd <pj...@wa...> Date: Wed Feb 8 22:54:57 2023 +0100 Darwin: try to fix assert in DRD The hard coded memory mapping trigger drd_start_using_mem_w_perms which will lead to tl_assert(vg_tid != VG_INVALID_THREADID); But vg_tid was just set to VG_INVALID_THREADID before the hard coded memory map. Diff: --- coregrind/m_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 0a7e96e500..b5501b5f31 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -2047,10 +2047,6 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) True /* executable? */, 0 /* di_handle: no associated debug info */ ); - /* Clear the running thread indicator */ - VG_(running_tid) = VG_INVALID_THREADID; - vg_assert(VG_(running_tid) == VG_INVALID_THREADID); - /* Darwin only: tell the tools where the client's kernel commpage is. It would be better to do this by telling aspacemgr about it -- see the now disused record_system_memory() in @@ -2068,6 +2064,10 @@ Int valgrind_main ( Int argc, HChar **argv, HChar **envp ) True, False, True, /* r-x */ 0 /* di_handle: no associated debug info */ ); # endif + + /* Clear the running thread indicator */ + VG_(running_tid) = VG_INVALID_THREADID; + vg_assert(VG_(running_tid) == VG_INVALID_THREADID); } //-------------------------------------------------------------- |