@@ -3794,28 +3821,37 @@ void CodeGenFunction::EmitCheck(
// representing operand values.
SmallVector Args;
SmallVector ArgTypes;
- if (!CGM.getCodeGenOpts().SanitizeMinimalRuntime) {
-Args.reserve(DynamicArgs.size() + 1);
-ArgTypes.reserve(DynamicArgs.size() + 1)
https://github.com/alazarev edited
https://github.com/llvm/llvm-project/pull/152192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alazarev updated
https://github.com/llvm/llvm-project/pull/152192
>From adf6d324a6681acb9fc837dd08afd180eaf46306 Mon Sep 17 00:00:00 2001
From: Andrew Lazarev
Date: Tue, 5 Aug 2025 18:16:00 +
Subject: [PATCH 1/4] [ubsan_minimal] Allow UBSan handler from Minimal runtime
t
@@ -0,0 +1,11 @@
+// RUN: %clang_min_runtime -fsanitize=null %s -o %t && %run %t 2>&1 |
FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address
0x{{[[:xdigit:]]+$}}
+ // CHECK-NOT: type
@@ -0,0 +1,11 @@
+// RUN: %clang_min_runtime -fsanitize=null %s -o %t && %run %t 2>&1 |
FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address
0x{{[[:xdigit:]]+$}}
+ // CHECK-NOT: type
@@ -0,0 +1,14 @@
+// RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 |
FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+ int r;
+ t = (int *)(((char *)&r) + 1);
+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} ad
@@ -3717,6 +3717,33 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF,
}
}
+// Adapts the arguments to the handler function.
+// It is expected that {StaticArgs..., DynamicArgs...} sequence matches the
+// corresponding XxxData type from the ubsan_handlers.h file.
+//
https://github.com/alazarev edited
https://github.com/llvm/llvm-project/pull/152192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,14 @@
+// RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 |
FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+ int r;
+ t = (int *)(((char *)&r) + 1);
+ // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} ad
@@ -3794,28 +3821,37 @@ void CodeGenFunction::EmitCheck(
// representing operand values.
SmallVector Args;
SmallVector ArgTypes;
- if (!CGM.getCodeGenOpts().SanitizeMinimalRuntime) {
-Args.reserve(DynamicArgs.size() + 1);
-ArgTypes.reserve(DynamicArgs.size() + 1)
https://github.com/alazarev updated
https://github.com/llvm/llvm-project/pull/152192
>From adf6d324a6681acb9fc837dd08afd180eaf46306 Mon Sep 17 00:00:00 2001
From: Andrew Lazarev
Date: Tue, 5 Aug 2025 18:16:00 +
Subject: [PATCH 1/3] [ubsan_minimal] Allow UBSan handler from Minimal runtime
t
https://github.com/alazarev updated
https://github.com/llvm/llvm-project/pull/152192
>From adf6d324a6681acb9fc837dd08afd180eaf46306 Mon Sep 17 00:00:00 2001
From: Andrew Lazarev
Date: Tue, 5 Aug 2025 18:16:00 +
Subject: [PATCH 1/2] [ubsan_minimal] Allow UBSan handler from Minimal runtime
t
https://github.com/alazarev edited
https://github.com/llvm/llvm-project/pull/152192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alazarev created
https://github.com/llvm/llvm-project/pull/152192
Also renamed minimal-specific WEAK_DEF anchor from __ubsan_report_error to
__ubsan_minimal_report_error.
A new __ubsan_minimal_report_error accepts address of the variable being
inspected.
The change increase
14 matches
Mail list logo