]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin: try to fix assert in DRD
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 8 Feb 2023 21:54:57 +0000 (22:54 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 8 Feb 2023 21:54:57 +0000 (22:54 +0100)
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.

coregrind/m_main.c

index 0a7e96e5009589357902c3ec2340a02c2d9640a2..b5501b5f313293318c49549f70d6baac2e2fa6ea 100644 (file)
@@ -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);
    }
 
    //--------------------------------------------------------------