Valgrind: r16269 - in /trunk: coregrind/m_scheduler/scheduler.c memcheck/mc_machine.c

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Valgrind: r16269 - in /trunk: coregrind/m_scheduler/scheduler.c memcheck/mc_machine.c

svn-2
Author: petarj
Date: Mon Mar 13 17:55:07 2017
New Revision: 16269

Log:
mips: improve emulation of LL/SC

Follow up to VEX r3316.

Related issue KDE #344524.

Patch by Maran Pakkirisamy.

Modified:
    trunk/coregrind/m_scheduler/scheduler.c
    trunk/memcheck/mc_machine.c

Modified: trunk/coregrind/m_scheduler/scheduler.c
==============================================================================
--- trunk/coregrind/m_scheduler/scheduler.c (original)
+++ trunk/coregrind/m_scheduler/scheduler.c Mon Mar 13 17:55:07 2017
@@ -957,6 +957,10 @@
    vg_assert(VG_(in_generated_code) == True);
    VG_(in_generated_code) = False;
 
+#if defined(VGA_mips32) || defined(VGA_mips64)
+   tst->arch.vex.guest_LLaddr = (HWord)(-1);
+#endif
+
    if (jumped != (HWord)0) {
       /* We get here if the client took a fault that caused our signal
          handler to longjmp. */

Modified: trunk/memcheck/mc_machine.c
==============================================================================
--- trunk/memcheck/mc_machine.c (original)
+++ trunk/memcheck/mc_machine.c Mon Mar 13 17:55:07 2017
@@ -1159,6 +1159,9 @@
    if (o == GOF(ac2)  && sz == 8) return o;
    if (o == GOF(ac3)  && sz == 8) return o;
 
+   if (o == GOF(LLaddr) && sz == 4) return -1;  /* slot unused */
+   if (o == GOF(LLdata) && sz == 4) return -1;  /* slot unused */
+
    VG_(printf)("MC_(get_otrack_shadow_offset)(mips)(off=%d,sz=%d)\n",
                offset,szB);
    tl_assert(0);
@@ -1238,6 +1241,9 @@
 
    if ((o > GOF(NRADDR)) && (o <= GOF(NRADDR) +12 )) return -1;
 
+   if (o == GOF(LLaddr) && sz == 8) return -1;  /* slot unused */
+   if (o == GOF(LLdata) && sz == 8) return -1;  /* slot unused */
+
    VG_(printf)("MC_(get_otrack_shadow_offset)(mips)(off=%d,sz=%d)\n",
                offset,szB);
    tl_assert(0);


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers