[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 14:52:51 PDT 2024
================
@@ -3324,6 +3359,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) {
DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(),
StringRef(), std::nullopt, Buffer, std::nullopt);
+ if (IsBitInt) {
+ // The Structure is: 0 to end the string, 32 bit unsigned integer in target
+ // endianness, zero.
+ char S[6] = {'\0', '\0', '\0', '\0', '\0', '\0'};
----------------
earnol wrote:
It is not used explicitly and serves as a guard byte. The idea is to have 2 consecutive zero bytes at the end of the line.
https://github.com/llvm/llvm-project/pull/96240
More information about the cfe-commits
mailing list