[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Thanks! LGTM in general. https://github.com/llvm/llvm-project/pull/104741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-17 Thread Vitaly Buka via cfe-commits
@@ -633,9 +633,11 @@ static void handleInvalidBuiltin(InvalidBuiltinData *Data, ReportOptions Opts) { ScopedReport R(Opts, Loc, ET); - Diag(Loc, DL_Error, ET, - "passing zero to %0, which is not a valid argument") -<< ((Data->Kind == BCK_CTZPassedZero) ? "ctz()"

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-17 Thread Vitaly Buka via cfe-commits
@@ -1996,16 +1996,21 @@ struct CallObjCArcUse final : EHScopeStack::Cleanup { Value *CodeGenFunction::EmitCheckedArgForBuiltin(const Expr *E, vitalybuka wrote: TO my taste, I'd rather forked EmitCheckedArgForBuiltin into a version for Assume very little code

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-17 Thread Vitaly Buka via cfe-commits
@@ -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

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-17 Thread Vitaly Buka via cfe-commits
@@ -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

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-17 Thread Vitaly Buka via cfe-commits
@@ -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

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-17 Thread Vitaly Buka via 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

[clang] [clang] Catch missing format attributes (PR #105479)

2024-09-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. Before looking into details, may I ask you to: 1. Re-base 2. address or reply to existing comments 3. click re-request review. Thank you! https://github.com/llvm/llvm-project/pull/105479 __

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

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

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

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

[clang] [compiler-rt] [libcxx] [lldb] [llvm] Rename Sanitizer Coverage => Coverage Sanitizer (PR #106505)

2024-09-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. I think it change the meaning completly. I read "Coverage Sanitizer" as a tool which finds bugs in Coverage. When "Sanitizer Coverage" as a coverage used by sanitizers. https://github.com/llvm/llvm-project/pull/106505

[clang] [llvm] [Instrumentation] Move out to Utils (NFC) (PR #108532)

2024-09-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/108532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Instrumentation] Move out to Utils (NFC) (PR #108532)

2024-09-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/108532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

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

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

2024-09-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/107707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][rtsan] Docs of how to disable rtsan (PR #107707)

2024-09-09 Thread Vitaly Buka via cfe-commits
@@ -83,3 +83,53 @@ non-zero exit code. #13 0x00010230dd64 in main main.cpp:9 #14 0x0001958960dc () #15 0x2f557ffc () + +Disabling +- + +In some circumstances, you may want to suppress error reporting in a specific scope. + +In C++, this is achieve

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM, with addressed comments https://github.com/llvm/llvm-project/pull/106736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-09-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/106650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add realtime_sanitizer to Features.def (PR #106650)

2024-09-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/106650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-06 Thread Vitaly Buka via cfe-commits
@@ -54,6 +54,8 @@ FEATURE(memtag_globals, FEATURE(xray_instrument, LangOpts.XRayInstrument) FEATURE(undefined_behavior_sanitizer, LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(realtime_sanitizer, vitalybuka wrote: clang/feature should

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

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

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-06 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clangxx -fsanitize=realtime %s -o %t +// RUN: not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx %s -fsanitize=realtime -o - -S -emit-llvm | FileCheck %s --check-prefix=CHECK-ENABLED-IR +// RUN: %clangxx %s -o - -S -emit-llvm | FileCheck %s --check-pref

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-06 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,69 @@ +//===-- sanitizer/rtsan_interface.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [compiler-rt] [compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (PR #106736)

2024-09-06 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,69 @@ +//===-- sanitizer/rtsan_interface.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Delay sanitizer args parsing. (PR #107280)

2024-09-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/107280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Catch missing format attributes (PR #105479)

2024-08-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Can you explain what changes were made to address the various issues which > caused the earlier revert? I've tried diffing the PRs to see what the changes > are, but my git-fu is insufficient to the task. :-D Just for convenience I extracted update diff into https://github

[clang] Update Catch missing format attributes (PR #106649)

2024-08-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/106649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update Catch missing format attributes (PR #106649)

2024-08-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/106649 None >From 46f3fb6634138f2d9ce8f301b05d09d16da9f3ea Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 29 Aug 2024 17:43:18 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

[clang] Revert "[clang] Add nuw attribute to GEPs" (PR #106343)

2024-08-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > Please let me know if you have a fix for that. I'll land revert in the > > morning by PDT. > > Thank you for flagging this up and opening this @vitalybuka - I'm taking a > look now to see if there's an easy enough fix to save reverting. Thanks. Please merge the revert if

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Maybe the patch introduced some miscompile? The patch affects only clang, but failing tests are LLVM, but tools compiled with patched clang with UBSAN enabled. Also there are branches checking sanitizers. https://github.com/llvm/llvm-project/pull/105496 __

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > This patch breaks: https://lab.llvm.org/buildbot/#/builders/25/builds/1952 > > https://lab.llvm.org/buildbot/#/builders/52/builds/1775 > > From the buildbot run I can see 12 or 13 changes in the build that failed. > Just out of curiosity how did you find out it was this p

[clang] Revert "[clang] Add nuw attribute to GEPs" (PR #106343)

2024-08-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Please let me know if you have a fix for that. I'll land revert in the morning by PDT. https://github.com/llvm/llvm-project/pull/106343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This patch breaks: https://lab.llvm.org/buildbot/#/builders/25/builds/1952 https://lab.llvm.org/buildbot/#/builders/52/builds/1775 https://github.com/llvm/llvm-project/pull/105496 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
@@ -314,26 +314,55 @@ Currently, this option supports three overflow-dependent code idioms: unsigned long foo = -1UL; // No longer causes a negation overflow warning unsigned long bar = -2UL; // and so on... -``post-decr-while`` +``unsigned-post-decr-while`` .. cod

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

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

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. I've updated the patch and can land later https://github.com/llvm/llvm-project/pull/105709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/105709 >From c55507b3d5552d573068140736e8f904640924e9 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Wed, 21 Aug 2024 19:29:03 -0700 Subject: [PATCH 1/2] rename some patterns, rewrite docs >From Vitaly's review

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

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

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
@@ -4806,6 +4806,34 @@ getOverflowPatternBinOp(const BinaryOperator *E) { return {}; } +/// Compute and set the OverflowPatternExclusion bit based on whether the vitalybuka wrote: Maybe this way? ``` static void computeOverflowPatternExclusion(const ASTCont

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
@@ -314,26 +314,55 @@ Currently, this option supports three overflow-dependent code idioms: unsigned long foo = -1UL; // No longer causes a negation overflow warning unsigned long bar = -2UL; // and so on... -``post-decr-while`` +``unsigned-post-decr-while`` .. cod

[clang] [Clang] Overflow Pattern Exclusion - rename some patterns, enhance docs (PR #105709)

2024-08-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Here's a screenshot of the rendered table so you don't have to build the html > docs yourself to inspect the layout: With this table, pattern affect only one sanitizer check, so splitting checks, as I suggested is possible. However I chatted with other folks, seems they ar

[clang] Re-land "[clang] Merge lifetimebound and GSL code paths for li… (PR #105753)

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

[clang] Re-land "[clang] Merge lifetimebound and GSL code paths for li… (PR #105753)

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/105753 ... just for visibility >From 04376ece0618912d85a9a52a5f00f3eb3aa63c30 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 22 Aug 2024 16:38:31 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[clang]=

[clang] Revert "[clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)" (PR #105752)

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/105752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)" (PR #105752)

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/105752 Revert as it breaks libc++ tests, see #104906. This reverts commit c368a720a0b40bb8fe4aff3971fe9a7009c85aa6. >From 1482dc3f18243d09e7d205b724c76d69c0284b99 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date:

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Also https://lab.llvm.org/buildbot/#/builders/164/builds/2291 https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -367,6 +367,21 @@ class LangOptionsBase { PerThread, }; + /// Exclude certain code patterns from being instrumented by arithmetic + /// overflow sanitizers + enum OverflowPatternExclusionKind { +/// Don't exclude any overflow patterns from sanitizers +None

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka deleted https://github.com/llvm/llvm-project/pull/104889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize=signed-integer-overflow,unsigned-integer-overflow -fsanitize-undefined-ignore-overflow-pattern=all %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsanitize

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -367,6 +367,21 @@ class LangOptionsBase { PerThread, }; + /// Exclude certain code patterns from being instrumented by arithmetic + /// overflow sanitizers + enum OverflowPatternExclusionKind { +/// Don't exclude any overflow patterns from sanitizers +None

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

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

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -293,6 +293,48 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

[clang] [Clang] Re-land Overflow Pattern Exclusions (PR #104889)

2024-08-21 Thread Vitaly Buka via cfe-commits
@@ -438,6 +438,36 @@ Moved checkers Sanitizers -- +- Added the ``-fsanitize-undefined-ignore-overflow-pattern`` flag which can be + used to disable specific overflow-dependent code patterns. The supported + patterns are: ``add-overflow-test``, ``negated-unsigned-cons

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM, but please get approvals from other responded reviewers https://github.com/llvm/llvm-project/pull/102622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-18 Thread Vitaly Buka via cfe-commits
@@ -995,6 +996,13 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) + PB.registerScalarOptimizerLateEPCallback( vitalybuka wrote: Thi

[clang] d257cd8 - [CodeGen][asan] Use `%t` instead of `cd` in test

2024-08-16 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-08-16T23:02:12-07:00 New Revision: d257cd875873666d250e3fa7e95aafcd099f4e2f URL: https://github.com/llvm/llvm-project/commit/d257cd875873666d250e3fa7e95aafcd099f4e2f DIFF: https://github.com/llvm/llvm-project/commit/d257cd875873666d250e3fa7e95aafcd099f4e2f.diff L

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

2024-08-16 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > Can we split `-fsanitize=unsigned-integer-overflow` into > > `-fsanitize=unsigned-integer-overflow-patternA,unsigned-integer-overflow-patternB,unsigned-integer-overflow-patternC...` > > ? > > Then it's quite intuitive to disable them with `no-sanitize`. > > Yikes, no way.

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-08-16 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > How i can see the full amount of breakage on different platforms > > proactively? I have created a PR: #104607 to address the big endian issue > > with the test as my // REQUIRES: x86-registered-target turned out not to be > > enough to exclude running test in the big end

[clang] [compiler-rt] [test] Prevent generation of the bigendian code inside clang test CodeGen/bit-int-ubsan.c (PR #104607)

2024-08-16 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/104607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > Before reland, please include me into review I'd like to understand why > > `-fsanitize-pattern-exclusion=all` is better than something like > > `-fno-sanitize=overflow-pattern-all` > > The latter doesn't make sense to me. `no-sanitize` takes a list of sanitizers > to co

[clang] [compiler-rt] [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (PR #104494)

2024-08-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/104494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (PR #104494)

2024-08-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/104494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (PR #104494)

2024-08-15 Thread Vitaly Buka via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: x86_64-target-arch vitalybuka wrote: I will disabled for windows as well, please investigate after we fix bots? https://github.com/llvm/llvm-project/pull/104494 ___ cfe-commits mailing lis

[clang] [compiler-rt] [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (PR #104494)

2024-08-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/104494 >From 98d3d539c84c917ba7369f688ba26ff172c9d89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Wed, 7 Aug 2024 17:29:35 -0400 Subject: [PATCH 1/5] [ubsan] Display corre

[clang] [compiler-rt] [ubsan] Limit _BitInt ubsan tests to x86-64 platform only (PR #104494)

2024-08-15 Thread Vitaly Buka via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: x86_64-target-arch vitalybuka wrote: What is about https://lab.llvm.org/buildbot/#/builders/107/builds/1916 https://github.com/llvm/llvm-project/pull/104494 ___ cfe-commits mailing list c

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

2024-08-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Before reland, please include me into review I'd like to understand why `-fsanitize-pattern-exclusion=all` is better than something like `-fno-sanitize=overflow-pattern-all` https://github.com/llvm/llvm-project/pull/100272 ___ cfe-co

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

2024-08-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Already reverted. https://github.com/llvm/llvm-project/pull/104472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

2024-08-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/104472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

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

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

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

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

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

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

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

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

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

[clang] Revert "[Clang] Overflow Pattern Exclusions (#100272)" (PR #104472)

2024-08-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/104472 This reverts commit 9a666deecb9ff6ca3a6b12e6c2877e19b74b54da. >From 29256f6703beafdfbb74df08c8358301a5873885 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 15 Aug 2024 10:09:35 -0700 Subject: [PATCH]

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

2024-08-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: We should revert this patch. It breaks mupltiple bots, introducing Msan reports. Also on a first look I don't like `-fsanitize-pattern-exclusion=` at all, very inconsistent. I assumed we agreed to splitting sanitizers into smaller sets? I would like to know why we need to intr

[clang] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-08-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: This applies as well to MemorySanitizer, ThreadSanitizer, LeakSanitizer, HWAddressSanitizer, more or less UBSan with diagnostics. Would you like to update those as well? https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commi

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/102859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-13 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @hahnjo I believe I explained "Update const.cpp" issue. So I am going to merge as the that continue to sporadically brake. https://github.com/llvm/llvm-project/pull/102859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > > Quick question for my understanding: With `spr` we don't get meaningful > > > commit messages anymore? That's quite unfortunate... > > > > > > Can you please clarify? > > The commit messages in this PR are `initial version` and `Update const.cpp`, > which is totally u

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

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

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/102859 >From fcf5476d8e8ef543a50d33b379c79e761374b9ee Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 12 Aug 2024 00:42:28 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Quick question for my understanding: With `spr` we don't get meaningful > commit messages anymore? That's quite unfortunate... Can you please clarify? https://github.com/llvm/llvm-project/pull/102859 ___ cfe-commits mailing list

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/102859 It's very flaky recently. Issue #102858 >From fcf5476d8e8ef543a50d33b379c79e761374b9ee Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 12 Aug 2024 00:42:28 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98

[clang] Revert "Revert "[clang][Interp] Improve "in call to" call argument printing"" (PR #102786)

2024-08-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I am not sure what is going on there, maybe it needs // UNSUPPORTED: asan > > I am not going to reland, it's just a notice, to make sure you noticed the > revert. Looks like it some kind of flakiness in the test. It returned https://lab.llvm.org/buildbot/#/builders/52/bui

  1   2   3   4   5   6   7   8   9   >