Summary: | Check for self-assignment in Length::operator=(const Length&) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | CSS | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, commit-queue, ddkilzer, kling, koivisto, simon.fraser | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Chris Dumez
2015-02-09 14:31:55 PST
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". |