diff options
author | Vedant Kumar <vsk@apple.com> | 2017-07-29 00:19:51 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-07-29 00:19:51 +0000 |
commit | 10c3102071efff9ecf3828d3e4e0bc528c493d81 (patch) | |
tree | 9ce2bc823acb6d0f3567bcd1b8a0349fbc772d00 /libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm | |
parent | 4335c3992a521800d4473315847083f0beaf244f (diff) | |
download | bcm5719-llvm-10c3102071efff9ecf3828d3e4e0bc528c493d81.tar.gz bcm5719-llvm-10c3102071efff9ecf3828d3e4e0bc528c493d81.zip |
[ubsan] Diagnose invalid uses of builtins (clang)
On some targets, passing zero to the clz() or ctz() builtins has undefined
behavior. I ran into this issue while debugging UB in __hash_table from libcxx:
the bug I was seeing manifested itself differently under -O0 vs -Os, due to a
UB call to clz() (see: libcxx/r304617).
This patch introduces a check which can detect UB calls to builtins.
llvm.org/PR26979
Differential Revision: https://reviews.llvm.org/D34590
llvm-svn: 309459
Diffstat (limited to 'libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm')
0 files changed, 0 insertions, 0 deletions