commit | 6bc82cde9ef279acd8b4d175d8fea081445189c3 | [log] [tgz] |
---|---|---|
author | Ryan Prichard <rprichard@google.com> | Mon Jul 13 22:06:47 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Aug 28 11:17:35 2020 -0700 |
tree | 76dbed03ab4648582966d7eeb3ce1eceab95797c | |
parent | 02f6350ac5ca69baf4d89652e46fb4034f1c1b88 [diff] |
[libunwind] Fix getSLEB128 on large values Previously, for large-enough values, getSLEB128 would attempt to shift a signed int in the range [0..0x7f] by 28, 35, 42... bits, which is undefined behavior and likely to fail. Avoid shifting (-1ULL) by 70 for large values. e.g. For INT64_MAX, the last two bytes will be: - 0x7f [bit==56] - 0x00 [bit==63] Differential Revision: https://reviews.llvm.org/D83742 GitOrigin-RevId: fd802cc4dea4ed1a233ff725f98c686dc2836bf3