[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-08-06 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-08-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 154d3505ab13275086b3dffed67bcdcac52f79a3 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/7] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-08-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 154d3505ab13275086b3dffed67bcdcac52f79a3 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/6] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-29 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 06b702cd38943314b2e6f873e64d70baed6f57f7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/5] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-25 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @kees @vitalybuka 3ef8d3c implements `-fsanitize=pattern-exclusion=`. It supports the following values: `all` - turn all supported pattern exclusions ON `none` - turn them all off (has precedence over others, I will add a warning soon if users try to use this with "all" or an

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 06b702cd38943314b2e6f873e64d70baed6f57f7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/4] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > > Right, unsigned overflow is well-defined. This isn't about the semantics of > > "undefined-ness". We want the unsigned sanitizer ON but some of the things > > it reports are noisy -- that's what this PR is about > > "Idiom" seems to vague to me. kernel has own opinion on

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Right, unsigned overflow is well-defined. This isn't about the semantics of > "undefined-ness". We want the unsigned sanitizer ON but some of the things it > reports are noisy -- that's what this PR is about "Idiom" seems to vague to me. kernel has own opinion on what is i

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > I assume you are going to change fronted to avoid compiler abusing these UBs? Well, like you said, none of this is really undefined behavior and isn't getting optimized away. The exception being `if ( a + b < a )` which can definitely have some unexpected results with high

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > Actually stuff like unsigned overflows are not UB. > > Maybe instead of `-fno-sanitize-overflow-idioms` we convert into > `unsigned-integer-overflow` into ` check group` so user can > -fno-sanitize=-unsigned-integer-overflow Right, unsigned overflow is well-defined. This

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
@@ -312,6 +312,38 @@ This attribute may not be supported by other compilers, so consider using it together with ``#if defined(__clang__)``. +Disabling instrumentation of common overflow idioms += + +There are certain overflow

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I assume you are going to change fronted to avoid compiler abusing these UBs? Actually stuff like unsigned overflows are not UB. Maybe instead of `-fno-sanitize-overflow-idioms` we convert into `unsigned-integer-overflow` into ` check group` so user can -fno-sanitize=-uns

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Vitaly Buka via cfe-commits
@@ -312,6 +312,38 @@ This attribute may not be supported by other compilers, so consider using it together with ``#if defined(__clang__)``. +Disabling instrumentation of common overflow idioms += + +There are certain overflow

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I assume you are going to change fronted to avoid compiler abusing these UBs? https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 06b702cd38943314b2e6f873e64d70baed6f57f7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/3] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 8bdc3d9ebb19e8c455c77241ef52ea74be6acfed 1dd1cbb1b13d0b038fa511620af993238a5bb260 --e

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Justin Stitt (JustinStitt) Changes ## Summary Introduce `-fno-sanitize-overflow-idioms` which disables sanitizer instrumentation for common overflow-dependent code idioms. ## Background For a wide selection of projects, proper over

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Stitt (JustinStitt) Changes ## Summary Introduce `-fno-sanitize-overflow-idioms` which disables sanitizer instrumentation for common overflow-dependent code idioms. ## Background For a wide selection of projects, proper overflow sa

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-23 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt created https://github.com/llvm/llvm-project/pull/100272 ## Summary Introduce `-fno-sanitize-overflow-idioms` which disables sanitizer instrumentation for common overflow-dependent code idioms. ## Background For a wide selection of projects, proper overflow sanit