diff options
author | Shilei Tian <tianshilei1992@gmail.com> | 2020-10-22 21:21:41 -0400 |
---|---|---|
committer | Shilei Tian <tianshilei1992@gmail.com> | 2020-10-22 21:22:19 -0400 |
commit | 3091ed099f2f6a3d16dbdae7d0406f54dfc3031f (patch) | |
tree | d4df4346c4a67e354ac3df055e30889cdf7d00ec /clang/unittests/Basic/SourceManagerTest.cpp | |
parent | e42f6c0ac05bae37be8e2a5fd8861773646eae1b (diff) | |
download | llvm-3091ed099f2f6a3d16dbdae7d0406f54dfc3031f.zip llvm-3091ed099f2f6a3d16dbdae7d0406f54dfc3031f.tar.gz llvm-3091ed099f2f6a3d16dbdae7d0406f54dfc3031f.tar.bz2 |
[OpenMP] Fixed a potential integer overflow
`size_t` has different width on 32- and 64-bit architecture, but the
computation to floor to power of two assumed it is 64-bit, which can cause an
integer overflow. In this patch, architecture detection is added so that the
operation for 64-bit `size_t`. Thank Luke for reporting the issue.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D89878
Diffstat (limited to 'clang/unittests/Basic/SourceManagerTest.cpp')
0 files changed, 0 insertions, 0 deletions