Check for self-assignment in Length::operator=(const Length&) as calling memset() with the same source and destination addresses has undefined behavior.
Created attachment 246292 [details] Patch
Created attachment 246293 [details] Patch
Comment on attachment 246293 [details] Patch Clearing flags on attachment: 246293 Committed r179860: <http://trac.webkit.org/changeset/179860>
All reviewed patches have been landed. Closing bug.
(In reply to comment #0) > Check for self-assignment in Length::operator=(const Length&) as calling > memset() with the same source and destination addresses has undefined > behavior. On Darwin platforms (iOS, OS X), the undefined behavior has been well-defined as being identical to memmove(). (However, that's not true on other platforms, so it's still a good idea to fix this.)
(In reply to comment #5) > (In reply to comment #0) > > Check for self-assignment in Length::operator=(const Length&) as calling > > memset() with the same source and destination addresses has undefined > > behavior. > > On Darwin platforms (iOS, OS X), the undefined behavior has been > well-defined as being identical to memmove(). (However, that's not true on > other platforms, so it's still a good idea to fix this.) Oh, I did not know that. If I do a "man memcpy" on my Mac, it says "If dst and src overlap, behavior is undefined".