This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix UB about shift amount exceeds data bit-width
ClosedPublic

Authored by weimingz on Mar 7 2018, 3:51 PM.

Details

Summary

Fixes an UB caught by sanitizer. The shift amount might be larger than 32 so the operand should be 1ULL.
In this patch, we replace the original expression with existing API with uint64_t type.

Diff Detail

Repository
rL LLVM

Event Timeline

weimingz created this revision.Mar 7 2018, 3:51 PM
rengolin accepted this revision.Mar 7 2018, 4:05 PM

Nice! LGTM, thanks!

This revision is now accepted and ready to land.Mar 7 2018, 4:05 PM
This revision was automatically updated to reflect the committed changes.