[Webkit-unassigned] [Bug 23501] Overlapping memcpy in TestDecoder::reset

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 27 09:51:07 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=23501





------- Comment #4 from darin at apple.com  2009-01-27 09:51 PDT -------
(In reply to comment #3)
> The compiler uses memcpy() to implement the copy.  I don't think I am crazy or
> have misconfigured development tools:

Your compiler uses memcpy, so that means that in the opinion of the folks
implementing the compiler, it's OK to use memcpy when both arguments point to
the same address.

But your development tool considers that a dangerous overlapping memcpy.

Those are the misconfigured development tools. Those tools need to agree.
Either memcpy is illegal for this case, and hence the C++ compile must not
generate that code because self-assignment is legal and supported in C++. Or
memcpy is legal for this case, and your overlapping memcpy tool needs to
understand that an not complain.

Of course you're not "crazy"! I know you are trying to do the right thing here.

But checking before an assignment that the new value isn't the same as the old
is *not* the right thing.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list