diff mbox

[trans-mem] fix trydropreference() failure for ia32

Message ID 20100713211124.GA1184@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez July 13, 2010, 9:11 p.m. UTC
Brain fart.

We're not going to go very far if we src==dst and we try to copy from
'src' to 'dst' :).  We need to copy from the actual cache line.

Committed as obvious.  Dunno why the testcase (dropref-2.c) worked on
x86-64.  Don't care.  We now work on both 32 and 64 bits.

One more ia32 failure to go (libitm.c++/eh-1.C).

	* method-wbetl.cc (trydropreference): Fix source line.
diff mbox

Patch

Index: method-wbetl.cc
===================================================================
--- method-wbetl.cc	(revision 161512)
+++ method-wbetl.cc	(working copy)
@@ -580,7 +580,7 @@  wbetl_dispatch::trydropreference (void *
     {
       pair = this->write_lock(src, WaW);
       *pair.mask = 0;
-      memcpy (dst, src, CACHELINE_SIZE);
+      memcpy (dst, pair.line, CACHELINE_SIZE);
       dst += CACHELINE_SIZE;
       src++;
       size -= CACHELINE_SIZE;