aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorDuo Wang <duow1@uci.edu>2023-11-27 11:13:27 -0800
committerGitHub <noreply@github.com>2023-11-27 11:13:27 -0800
commite3f16de9a33d48f6a9d8035a9aebfdb0e3a16ea5 (patch)
treed3905fdaba32b14e8ba412b112659832b457055f /lldb/source/Commands/CommandObjectProcess.cpp
parentc2ba2b219054ea1f898678cceea4a159f948fa98 (diff)
downloadllvm-e3f16de9a33d48f6a9d8035a9aebfdb0e3a16ea5.zip
llvm-e3f16de9a33d48f6a9d8035a9aebfdb0e3a16ea5.tar.gz
llvm-e3f16de9a33d48f6a9d8035a9aebfdb0e3a16ea5.tar.bz2
[unittest][Support] Fix bad negation of signed integer in LEB128Test.SLEB128Size (#72700)
I came across an undefined behavior when running Support unit tests with UBSAN on Windows. ```bash [ RUN ] LEB128Test.SLEB128Size C:\llvm\unittests\Support\LEB128Test.cpp:382:3: runtime error: negation of -9223372036854775808 cannot be represented in type 'long long'; cast to an unsigned type to negate this value to itself SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior C:\llvm\unittests\Support\LEB128Test.cpp:382:3 in ``` UBSAN did not report the same error on macOS, but the negation still seemed invalid (`0x8000000000000000LL == -0x8000000000000000LL` evaluated to `true`). I can confirm that `-0x7fffffffffffffffLL - 1` results in the expected value on both platforms.
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
0 files changed, 0 insertions, 0 deletions