[clang] [clang][CodeGen] Added SanitizerHandler mapping, trap messages in debug info, and corresponding test cases. (PR #143758)
Dan Liew via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 23 07:29:17 PDT 2025
================
@@ -85,6 +85,92 @@ enum VariableTypeDescriptorKind : uint16_t {
// Miscellaneous Helper Methods
//===--------------------------------------------------------------------===//
+static llvm::StringRef GetTrapMessageForHandler(SanitizerHandler ID) {
+ switch (ID) {
+ case SanitizerHandler::AddOverflow:
+ return "Signed integer addition overflowed.";
----------------
delcypher wrote:
A thought I just had about these. We should probably try running our test cases without `-fsanitize-trap=undefined` to see how the non-trapping UBSan runtime describes them. We might want to make the messages here match the wording that's currently used when possible. It won't always because the runtime will have runtime information available that we don't have here.
https://github.com/llvm/llvm-project/pull/143758
More information about the cfe-commits
mailing list