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

2011-03-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5705


kenn...@gmail.com changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #2 from kenn...@gmail.com 2011-03-08 04:22:42 PST ---
*** Issue 5716 has been marked as a duplicate of this issue. ***

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


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

2011-03-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5705


Andrei Alexandrescu and...@metalanguage.com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||and...@metalanguage.com
 AssignedTo|nob...@puremagic.com|and...@metalanguage.com


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


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

2011-03-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5705



--- Comment #1 from kenn...@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: ---