diff options
author | Florian Hahn <flo@fhahn.com> | 2022-04-29 15:19:06 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-04-29 15:19:06 +0100 |
commit | a80081763cb3792bf69ee95ee73c8754f1bfe074 (patch) | |
tree | 7997e0bdcb45a4494ea619fdcf824607f40095fb /lldb/source/Commands/CommandObjectCommands.cpp | |
parent | 9e7c9967c3fd573ef53b145e24e6a1e6ba930c82 (diff) | |
download | llvm-a80081763cb3792bf69ee95ee73c8754f1bfe074.zip llvm-a80081763cb3792bf69ee95ee73c8754f1bfe074.tar.gz llvm-a80081763cb3792bf69ee95ee73c8754f1bfe074.tar.bz2 |
[SimplifyCFG] Avoid shifting by a too large exponent.
TI->getBitWidth can be > 64 and in those cases the shift will be UB due
to the exponent being too large.
To fix this, cap the shift at 63. I think this should work out fine,
because TableSize is itself a 64 bit type and the maximum table size
must fit in the type. Also, if we would underestimate the size here, at
most we get an extra ZExt.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D124608
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
0 files changed, 0 insertions, 0 deletions