[Issue 5705] Swapping identical tuple causes "overlapping array copy" exception.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 5 10:18:56 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5705



--- Comment #1 from kennytm at gmail.com 2011-03-05 10:15:59 PST ---
This could probably be fixed/worked-around in druntime.

diff --git a/src/rt/arraycat.d b/src/rt/arraycat.d
index c0aaa4d..e9c2c85 100644
--- a/src/rt/arraycat.d
+++ b/src/rt/arraycat.d
@@ -35,7 +35,7 @@ byte[] _d_arraycopy(size_t size, byte[] from, byte[] to)
     {
         memcpy(to.ptr, from.ptr, to.length * size);
     }
-    else
+    else if (to.ptr != from.ptr)
     {
         throw new Exception("overlapping array copy");
     }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list