| Summary: | DFG::IntegerCheckCombiningPhase's wrap-around check shouldn't trigger C++ undef behavior on wrap-around | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||
| Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | barraclough, benjamin, ggaren, mark.lam, mhahnenb, mmirman, msaboff, nrotem, oliver, saam, sam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Filip Pizlo
2015-04-08 12:48:06 PDT
Created attachment 250376 [details]
the patch
Landed in http://trac.webkit.org/changeset/182562 Comment on attachment 250376 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=250376&action=review > Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp:367 > + uint32_t unsignedDifference = maxBound - minBound; > + return !(unsignedDifference >> 31); Could also have written: int32_t difference = maxBound - minBound; return difference >= 0; |