llvm-project
8a86aabd - [LLDB] Fix UBSan issue with ValueType enums. (#195540)

Commit
65 days ago
[LLDB] Fix UBSan issue with ValueType enums. (#195540) ValueTypeSyntheticMask, when bitwise OR'd with ValueType enums, produces a value that is outside the official enum range for ValueTypes. This causes UBSan errors, when UBSan is set to check enum values. E.g. If you build LLDB with the Cmake flags -DCMAKE_CXX_FLAGS="-fsanitize=enum -fsanitize-trap=enum" -DCMAKE_C_FLAGS="-fsanitize=enum -fsanitize-trap=enum" Then try to run the LLDB test TestScripedFrameProvider, it crashes with a SIGILL from UBSan. This change fixes that by pulling ValueTypeSyntheticMask into the ValueType enums, expanding the valid enum range and making the bitwise OR'd values valid.
Author
Parents
Loading