1U has type unsigned int, and << of 32 or more is undefined behavior.
Use the proper type in the lhs of the shift.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
| Paths 
 |  Differential  D87973  
[scudo/standalone] Fix undefined behavior in checksum test ClosedPublic Authored by mcgrathr on Sep 19 2020, 11:43 AM. 
Details Summary 1U has type unsigned int, and << of 32 or more is undefined behavior. 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Sep 19 2020, 11:46 AM This revision was landed with ongoing or failed builds.Sep 19 2020, 12:28 PM Closed by commit rGf5fa5b9fe3b0: [scudo/standalone] Fix undefined behavior in checksum test (authored by mcgrathr).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
Diff 292983 compiler-rt/lib/scudo/standalone/tests/checksum_test.cpp
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||