JustinStitt wrote:
@vitalybuka
> Would it make sense to support attributes like
> `__attribute__((no_sanitize("-undefined")))` ? Seems like better
> representation of the fact that we want to undo sanitizer suppression.
I am working on the PR for supporting `__attribute__((no_sanitize()))` fo
JustinStitt wrote:
> > @vitalybuka any idea how lldb-server is failing with `UNRESOLVED`? How in
> > the world are any of the changes here affecting lldb-server?
>
> flake?
I believe it was unrelated to this PR
https://github.com/llvm/llvm-project/pull/107332
___
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From b5515eba87ffd96d010952bf18fe4044861df298 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 01/15] add wraps, no_wraps attributes
---
clang/docs/ReleaseN
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From b5515eba87ffd96d010952bf18fe4044861df298 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 01/14] add wraps, no_wraps attributes
---
clang/docs/ReleaseN
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
@@ -4852,6 +4862,10 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx,
Expr *lhs, Expr *rhs,
if (hasStoredFPFeatures())
setStoredFPFeatures(FPFeatures);
setDependence(computeDependence(this));
+ if (hasWrappingOperand(Ctx))
JustinStitt wrote:
A
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10818,11 +10819,39 @@ static bool IsImplicitBoolFloatConversion(Sema &S,
Expr *Ex, bool ToBool) {
FloatCandidateBT && (FloatCandidateBT->isFloatingPoint()));
}
+/// Check to see if the wraps or no_wraps attribute may have been lost through
+/// a function call.
@@ -6664,6 +6664,13 @@ def err_builtin_counted_by_ref_invalid_lhs_use : Error<
def err_builtin_counted_by_ref_has_side_effects : Error<
"'__builtin_counted_by_ref' argument cannot have side-effects">;
+def warn_wraps_attr_var_decl_type_not_integer : Warning<
+ "using attrib
@@ -6664,6 +6664,13 @@ def err_builtin_counted_by_ref_invalid_lhs_use : Error<
def err_builtin_counted_by_ref_has_side_effects : Error<
"'__builtin_counted_by_ref' argument cannot have side-effects">;
+def warn_wraps_attr_var_decl_type_not_integer : Warning<
@@ -6536,6 +6536,30 @@ static void HandleBTFTypeTagAttribute(QualType &Type,
const ParsedAttr &Attr,
::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type);
}
+static void handleWrapsAttr(QualType &Type, const ParsedAttr &Attr,
+TypeProcess
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From b5515eba87ffd96d010952bf18fe4044861df298 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 01/12] add wraps, no_wraps attributes
---
clang/docs/ReleaseN
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6664,6 +6664,13 @@ def err_builtin_counted_by_ref_invalid_lhs_use : Error<
def err_builtin_counted_by_ref_has_side_effects : Error<
"'__builtin_counted_by_ref' argument cannot have side-effects">;
+def warn_wraps_attr_var_decl_type_not_integer : Warning<
+ "using attrib
JustinStitt wrote:
@erichkeane
> Also, did we have an RFC on this? I'd like to see what the community at large
> has to say.
Yes, here's the
[RFC](https://discourse.llvm.org/t/rfc-add-wraps-attribute-for-granular-integer-overflow-handling/77670)
and the [previous PR](https://github.com/llvm/
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6536,6 +6536,30 @@ static void HandleBTFTypeTagAttribute(QualType &Type,
const ParsedAttr &Attr,
::new (Ctx) BTFTypeTagAttr(Ctx, Attr, BTFTypeTag), Type);
}
+static void handleWrapsAttr(QualType &Type, const ParsedAttr &Attr,
+TypeProcess
@@ -4852,6 +4862,10 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx,
Expr *lhs, Expr *rhs,
if (hasStoredFPFeatures())
setStoredFPFeatures(FPFeatures);
setDependence(computeDependence(this));
+ if (hasWrappingOperand(Ctx))
JustinStitt wrote:
I
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -triple x86_64-pc-linux-gnu
+typedef int __attribute__((wraps)) wrapping_int;
JustinStitt wrote:
> Can we test more types?
Yes, I'll add some more tests 😄
>
> Can the attributes be applied to point
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -433,6 +433,26 @@ Attribute Changes in Clang
- Fix a bug where clang doesn't automatically apply the ``[[gsl::Owner]]`` or
``[[gsl::Pointer]]`` to STL explicit template specialization decls.
(#GH109442)
+- Introduced ``__attribute__((wraps))`` which can be added to type
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -67,9 +67,11 @@ types specified within an ignorelist.
int a = 2147483647; // INT_MAX
++a;// Normally, an overflow with
-fsanitize=signed-integer-overflow
}
+
JustinStitt wrote:
I don't have commit access, but I'll revert that whit
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
@@ -8710,3 +8710,103 @@ Declares that a function potentially allocates heap
memory, and prevents any pot
of ``nonallocating`` by the compiler.
}];
}
+
+def WrapsDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``wraps`` attribute can be used wit
@@ -433,6 +433,26 @@ Attribute Changes in Clang
- Fix a bug where clang doesn't automatically apply the ``[[gsl::Owner]]`` or
``[[gsl::Pointer]]`` to STL explicit template specialization decls.
(#GH109442)
+- Introduced ``__attribute__((wraps))`` which can be added to type
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -433,6 +433,26 @@ Attribute Changes in Clang
- Fix a bug where clang doesn't automatically apply the ``[[gsl::Owner]]`` or
``[[gsl::Pointer]]`` to STL explicit template specialization decls.
(#GH109442)
+- Introduced ``__attribute__((wraps))`` which can be added to type
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From b5515eba87ffd96d010952bf18fe4044861df298 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 1/6] add wraps, no_wraps attributes
---
clang/docs/ReleaseNot
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From f58e6481650f8cda6089b2a0637c94596a45370e Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 1/6] add wraps, no_wraps attributes
---
clang/docs/ReleaseNot
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From f58e6481650f8cda6089b2a0637c94596a45370e Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 1/5] add wraps, no_wraps attributes
---
clang/docs/ReleaseNot
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From f58e6481650f8cda6089b2a0637c94596a45370e Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 1/6] add wraps, no_wraps attributes
---
clang/docs/ReleaseNot
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4142,6 +4142,12 @@ class BinaryOperator : public Expr {
return getFPFeaturesInEffect(LO).getAllowFEnvAccess();
}
+ /// Does one of the subexpressions have the wraps attribute?
+ bool hasWrappingOperand(const ASTContext &Ctx) const;
+
+ /// How about the no_wraps a
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/115094
>From f58e6481650f8cda6089b2a0637c94596a45370e Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 5 Mar 2024 03:14:49 +
Subject: [PATCH 1/5] add wraps, no_wraps attributes
---
clang/docs/ReleaseNot
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/115094
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -67,9 +67,11 @@ types specified within an ignorelist.
int a = 2147483647; // INT_MAX
++a;// Normally, an overflow with
-fsanitize=signed-integer-overflow
}
+
JustinStitt wrote:
The wraps docs reference the SSCL docs and I fixed so
https://github.com/JustinStitt created
https://github.com/llvm/llvm-project/pull/115094
> [!NOTE]
> Expansion of https://github.com/llvm/llvm-project/pull/86618, with a larger
> scope including `no_wraps` and
> [SSCL](https://clang.llvm.org/docs/SanitizerSpecialCaseList.html)
> integration.
JustinStitt wrote:
@vitalybuka any idea how lldb-server is failing with `UNRESOLVED`? How in the
world are any of the changes here affecting lldb-server?
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.l
JustinStitt wrote:
Hi Vitaly, thanks for expanding the usefulness of type suppression through
SCLs. LGTM
https://github.com/llvm/llvm-project/pull/114754
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
@@ -48,6 +48,64 @@ Example
$ clang -fsanitize=address -fsanitize-ignorelist=ignorelist.txt foo.c ;
./a.out
# No error report here.
+Usage with UndefinedBehaviorSanitizer
+=
+
+The arithmetic overflow sanitizers ``unsigned-integer-overfl
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/107332
>From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 3 Sep 2024 18:28:53 -0700
Subject: [PATCH 01/13] hook up sscl categories with overflow/truncation
saniti
JustinStitt wrote:
> My intuition is that @kees approach could be more efficient to get things
> done :) Maintaining a list of types can be annoying.
We discussed this at [Linux Plumbers '24](https://lpc.events/) and also on
[lkml](https://lore.kernel.org/all/202404291502.612E0A10@keescook/) w
https://github.com/JustinStitt deleted
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15,8 +15,9 @@ file at compile-time.
Goal and usage
==
-Users of sanitizer tools, such as :doc:`AddressSanitizer`,
:doc:`ThreadSanitizer`
-or :doc:`MemorySanitizer` may want to disable or alter some checks for
+Users of sanitizer tools, such as :doc:`AddressSan
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/107332
>From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 3 Sep 2024 18:28:53 -0700
Subject: [PATCH 01/12] hook up sscl categories with overflow/truncation
saniti
JustinStitt wrote:
BTW doc build failures linked to here:
https://github.com/llvm/llvm-project/pull/109220
unrelated to my changes 👍
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
JustinStitt wrote:
@vitalybuka
> Is "Test documentation build" error related?
I am noticing this documentation build failing in other [un-related Clang
patchsets](https://github.com/llvm/llvm-project/actions/runs/11598884769/job/32295763452?pr=114281)
(related to `ClangFormattedStatus`?). I d
JustinStitt wrote:
@melver
> Oh nice. If you have that almost done, why do you still want the filterlist?
> For the Linux kernel usecase, wouldn't the attribute be preferrable? My
> intuition tells me that maintaining a filterlist detached from the code will
> cause headaches, esp. during ref
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
@@ -1,23 +0,0 @@
-// Verify ubsan vptr does not check down-casts on ignorelisted types.
-// RUN: echo "type:_ZTI3Foo" > %t-type.ignorelist
-// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=vptr
-fsanitize-recover=vptr -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
@@ -0,0 +1,105 @@
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+
+// Verify ubsan doesn't emit checks for ignorelisted types
+// RUN: %clang_cc1 -triple x86_64-linux-gnu
-fsanitize=signed-integer-overflow,unsigned-integer-overflow
-fsanitize-ignorelist=%t/int.ignorelist -emit-ll
@@ -15,8 +15,9 @@ file at compile-time.
Goal and usage
==
-Users of sanitizer tools, such as :doc:`AddressSanitizer`,
:doc:`ThreadSanitizer`
-or :doc:`MemorySanitizer` may want to disable or alter some checks for
+Users of sanitizer tools, such as :doc:`AddressSan
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -197,6 +197,18 @@ static bool CanElideOverflowCheck(const ASTContext &Ctx,
const BinOpInfo &Op) {
if (!Op.mayHaveIntegerOverflow())
return true;
+ if (Op.Ty->isSignedIntegerType() &&
JustinStitt wrote:
I'll add a comment, good idea :)
https://gith
JustinStitt wrote:
> I wished that we could just attach attributes to type, e.g. `typedef int
> __attribute__((no_sanitize("signed-integer-overflow")) wrapping_int` or
> something. One thing here is that this should _not_ be a type modifier (like
> volatile and such), so it does not change the
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/107332
>From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 3 Sep 2024 18:28:53 -0700
Subject: [PATCH 1/6] hook up sscl categories with overflow/truncation
sanitize
JustinStitt wrote:
@vitalybuka Can we move forward with this? The most recent commit uses the
`=sanitize` `=no_sanitize` wording that you preferred.
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/JustinStitt edited
https://github.com/llvm/llvm-project/pull/107332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -817,6 +817,37 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
@@ -48,6 +49,63 @@ Example
$ clang -fsanitize=address -fsanitize-ignorelist=ignorelist.txt foo.c ;
./a.out
# No error report here.
+Usage with UndefinedBehaviorSanitizer
+=
+
+The arithmetic overflow sanitizers ``unsigned-integer-overfl
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/107332
>From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 3 Sep 2024 18:28:53 -0700
Subject: [PATCH 1/5] hook up sscl categories with overflow/truncation
sanitize
@@ -1,7 +1,28 @@
+// Verify ubsan doesn't emit checks for ignorelisted types
+// RUN: echo "[{unsigned-integer-overflow,signed-integer-overflow}]" >
%t-int.ignorelist
+// RUN: echo "type:int" >> %t-int.ignorelist
+// RUN: %clang_cc1 -triple x86_64-linux-gnu
-fsanitize=signed-int
https://github.com/JustinStitt updated
https://github.com/llvm/llvm-project/pull/107332
>From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001
From: Justin Stitt
Date: Tue, 3 Sep 2024 18:28:53 -0700
Subject: [PATCH 1/4] hook up sscl categories with overflow/truncation
sanitize
@@ -817,6 +817,37 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
return CanonTTP;
}
+/// Check if a type can have its sanitizer instrumentation elided.
+/// Determine this by its presence in a SCL alongside its specified categories.
+/// For example:
+/// ignorelist.tx
1 - 100 of 274 matches
Mail list logo