[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via 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 } + vitalybuka wrote: Yes, I'ts about spaces. Even if it's useful change ju

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Vitaly Buka via 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Naming wise I prefer `wrap` -> `no_sanitize("undefined")` already exists but does not apply to variables and types `no_wrap` -> `sanitize("undefined")` does not exist, and a little confusing (no_wrap as well). It may look it enabled sanitization. Would it make sense to suppo

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

2024-10-31 Thread Vitaly Buka via 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via 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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/109088 >From 255c4af822ea327b51547c5c666b172bb81c6454 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 18 Sep 2024 13:58:24 +0800 Subject: [PATCH 1/2] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` --

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

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/104741 >From e2ce302a0d3649594ff1a6b94420f815d0e1acde Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 19 Aug 2024 15:22:39 +0800 Subject: [PATCH 1/2] [UBSan] Diagnose assumption violation --- clang/lib/Cod

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

2024-09-24 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-24 Thread Vitaly Buka via cfe-commits
@@ -1996,16 +1996,21 @@ struct CallObjCArcUse final : EHScopeStack::Cleanup { Value *CodeGenFunction::EmitCheckedArgForBuiltin(const Expr *E, vitalybuka wrote: Done https://github.com/llvm/llvm-project/pull/104741 _

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

2024-09-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: clang with UBSAN is fine, i am running other tests. 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] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

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

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

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

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. Sorry, I realized the my request does not make much sense. Still PR contain message improvement and a bug fix. LGTM. https://github.com/llvm/llvm-project/pull/109088 ___ cfe-commits mailing li

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/109088 >From 255c4af822ea327b51547c5c666b172bb81c6454 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 18 Sep 2024 13:58:24 +0800 Subject: [PATCH 1/3] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` --

[clang] [compiler-rt] [Clang][compiler-rt][UBSan] Improve `__ubsan_handle_invalid_builtin` (PR #109088)

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/109088 >From 255c4af822ea327b51547c5c666b172bb81c6454 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Wed, 18 Sep 2024 13:58:24 +0800 Subject: [PATCH 1/4] [Clang][compiler-rt][UBSan] Remove `BuiltinCheckKind` --

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

2024-09-24 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-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I wonder how much code will be broken. We have internally `fsanitize=builtin` enabled, as is patch will break and force us to disable the sanitizers. I will try to run internal tests, and clang itself with a new check. If it breaks to much, we will need to create a new sanitiz

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

2024-09-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Other tests are also fine. 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] [llvm] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-09-26 Thread Vitaly Buka via cfe-commits
@@ -351,6 +353,14 @@ There are several limitations: * Check groups (like ``undefined``) can't be used in suppressions file, only fine-grained checks are supported. +Security Considerations +=== + +UndefinedBehaviorSanitizer's runtime is meant for testing

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

2024-09-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Don't forget to click "re-request review" after updating PRs, or it's not displayed as pending review request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [WIP][Driver] Enable ASan on Solaris/SPARC (PR #107403)

2024-09-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Curios, why Asan when there is Sparc ADI? https://github.com/llvm/llvm-project/pull/107403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][Driver] Enable ASan on Solaris/SPARC (PR #107403)

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

[clang] [WIP][Driver] Enable ASan on Solaris/SPARC (PR #107403)

2024-09-24 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Also if there is a feature similar to ARM TBI, hwasan is a better option. https://github.com/llvm/llvm-project/pull/107403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-08 Thread Vitaly Buka via 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

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

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

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

2024-11-13 Thread Vitaly Buka via cfe-commits
vitalybuka 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? https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-comm

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

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

[clang] [docs][asan][lsan] Drop list of supported architechures (PR #116302)

2024-11-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/116302 Full list is quite long, and quality of implementation can vary. Drop the lists to avoid confusion like https://github.com/rust-lang/rust/pull/123617 We don't maintain these for other sanitizers. >From 7da

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

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

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-24 Thread Vitaly Buka via cfe-commits
vitalybuka 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. > > Is there some other precedence for this `-undefined` syntax

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

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

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Vitaly Buka via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge (PR #117649)

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

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Vitaly Buka via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Vitaly Buka via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] Reapply "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (#117804) (PR #117805)

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

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Vitaly Buka via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[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] 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] [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] [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
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] Pack relocations for Android API >= 28 (PR #117624)

2024-12-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: breaks this bot https://lab.llvm.org/buildbot/#/builders/186/builds/4581 https://github.com/llvm/llvm-project/pull/117624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-08 Thread Vitaly Buka via cfe-commits
@@ -1410,7 +1410,7 @@ void tools::linkSanitizerRuntimeDeps(const ToolChain &TC, // libresolv.a, even if exists, is an empty archive to satisfy POSIX -lresolv // requirement. if (TC.getTriple().isOSLinux() && !TC.getTriple().isAndroid() && - !TC.getTriple().isMusl())

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

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

[clang] [nfc][clang-offload-bundler] Don't leak on exit(1) (PR #119178)

2024-12-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/119178 `exit(1)` Don't calls C++ destructors, however calls `at_exit()` handlers, including lsan. Usually lsan can see pointers of local allocations on stack or in registers, but those can be discarded by noreturn `

[clang] [nfc][clang-offload-bundler] Don't leak on exit(1) (PR #119178)

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

[clang] [ubsan] Improve lowering of @llvm.allow.ubsan.check (PR #119013)

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

[clang] [ubsan] Improve lowering of @llvm.allow.ubsan.check (PR #119013)

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

[clang] [ubsan] Improve lowering of @llvm.allow.ubsan.check (PR #119013)

2024-12-07 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119013 >From d66671a29061f80df52e4d4b7a2b6ce1de5cae27 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 6 Dec 2024 11:18:20 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?U

[clang] [NFC][ubsan] Pre-commit test with missed optimization (PR #119012)

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

[clang] [nfc][clang-offload-bundler] Don't leak on exit(1) (PR #119178)

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

[clang] [Driver] Make regex stricter (PR #121243)

2024-12-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121243 Follow up to #121221. >From 85581e8a0481388781b2c715fd746c908ea5fa04 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 27 Dec 2024 18:32:15 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=

[clang] [Driver] Make regex stricter (PR #121243)

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

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -186,10 +188,24 @@ struct SanitizerSet { /// Returns a non-zero SanitizerMask, or \c 0 if \p Value is not known. SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups); +/// Parse a single weighted value (e.g., 'undefined=0.05') from a -fsanitize= or +/// -fn

[clang] Driver][SYCL] Address sanitizer and test issue (PR #121822)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -32,7 +31,7 @@ void SYCLInstallationDetector::addSYCLIncludeArgs( // Unsupported options for SYCL device compilation. static ArrayRef getUnsupportedOpts() { - return { + static std::vector UnsupportedOpts = { vitalybuka wrote: and C array: UnsupportedOpt

[clang] Driver][SYCL] Address sanitizer and test issue (PR #121822)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -17,8 +17,7 @@ using namespace llvm::opt; SYCLInstallationDetector::SYCLInstallationDetector( const Driver &D, const llvm::Triple &HostTriple, -const llvm::opt::ArgList &Args) -: D(D) {} +const llvm::opt::ArgList &Args) {} vitalybuka wrote:

[clang] [Driver][SYCL] Address sanitizer and test issue (PR #121822)

2025-01-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121822 >From 92796278b87c5713a0cf16119009c07f87568df5 Mon Sep 17 00:00:00 2001 From: Michael D Toguchi Date: Mon, 6 Jan 2025 11:42:12 -0800 Subject: [PATCH 1/3] Driver][SYCL] Address sanitizer and test issue The fo

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -3615,9 +3616,12 @@ void CodeGenFunction::EmitCheck( if (!CGM.getCodeGenOpts().SanitizeMergeHandlers.has(Checked[i].second)) NoMerge = true; + +if (!CGM.getCodeGenOpts().NoSanitizeTopHot.has(Checked[i].second)) + SanitizeGuardChecks = true; } - if (

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +typedef double SanitizerMaskWeights[SanitizerKind::SO_Count]; vitalybuka wrote: float is probably enough https://github.com/llvm/llvm-project/pull/121619 __

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +typedef double SanitizerMaskWeights[SanitizerKind::SO_Count]; vitalybuka wrote: typedef -> using https://github.com/llvm/llvm-project/pull/121619 __

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +typedef double SanitizerMaskWeights[SanitizerKind::SO_Count]; vitalybuka wrote: also std::array<> https://github.com/llvm/llvm-project/pull/121619 _

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -2649,6 +2649,11 @@ def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-unde HelpText<"Strip (or keep only, if negative) a given number of path components " "when emitting check metadata.">, MarshallingInfoInt, "0", "int">; +def fno_

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -2649,6 +2649,11 @@ def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-unde HelpText<"Strip (or keep only, if negative) a given number of path components " "when emitting check metadata.">, MarshallingInfoInt, "0", "int">; +def fno_

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -26,6 +26,8 @@ class SanitizerArgs { SanitizerSet RecoverableSanitizers; SanitizerSet TrapSanitizers; SanitizerSet MergeHandlers; + SanitizerSet TopHot; + SanitizerMaskWeights TopHotWeights = {0}; vitalybuka wrote: It's not `Weight`, it's `cutoff th

[clang] [Driver][SYCL] Address sanitizer and test issue (PR #121822)

2025-01-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. Does not compile I'll update and merge. https://github.com/llvm/llvm-project/pull/121822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Driver][SYCL] Address sanitizer and test issue (PR #121822)

2025-01-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121822 >From 92796278b87c5713a0cf16119009c07f87568df5 Mon Sep 17 00:00:00 2001 From: Michael D Toguchi Date: Mon, 6 Jan 2025 11:42:12 -0800 Subject: [PATCH 1/4] Driver][SYCL] Address sanitizer and test issue The fo

[clang] [Driver][SYCL] Address sanitizer and test issue (PR #121822)

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

[clang] [Driver][SYCL] Address sanitizer and test issue (PR #121822)

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

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -186,10 +188,24 @@ struct SanitizerSet { /// Returns a non-zero SanitizerMask, or \c 0 if \p Value is not known. SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups); +/// Parse a single weighted value (e.g., 'undefined=0.05') from a -fsanitize= or +/// -fn

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -1463,17 +1504,18 @@ void SanitizerArgs::addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, } SanitizerMask parseArgValues(const Driver &D, const llvm::opt::Arg *A, vitalybuka wrote: Instead of extending this function, it would be cleaner to cre

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -3602,6 +3602,7 @@ void CodeGenFunction::EmitCheck( llvm::Value *RecoverableCond = nullptr; llvm::Value *TrapCond = nullptr; bool NoMerge = false; + bool SanitizeGuardChecks = ClSanitizeGuardChecks; vitalybuka wrote: Usually we parse Cls as `if (ClSa

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Vitaly Buka via cfe-commits
@@ -3615,9 +3616,12 @@ void CodeGenFunction::EmitCheck( vitalybuka wrote: maybe we can keep the patch Driver only, because we need: passing fractions array into LLVM passes: ubsan and hwasan https://github.com/llvm/llvm-project/pull/121619 ___

[clang] [HLSL] Fix build warning after #116331 (PR #121852)

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

[clang] [HLSL] Fix build warning after #116331 (PR #121852)

2025-01-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121852 After #116331 is always SpellingNotCalculated, so I assume doing nothing is expected. >From d5cedbc7b822671f5ac45e1f4d49ed91c13858e3 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 6 Jan 2025 14:48:15

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Vitaly Buka via cfe-commits
@@ -46,26 +47,20 @@ bool clang::parseSanitizerWeightedValue(StringRef Value, bool AllowGroups, #include "clang/Basic/Sanitizers.def" .Default(SanitizerMask()); - if (ParsedKind) { -size_t equalsIndex = Value.find_first_of('='); -if (e

[clang] [llvm] [tysan] Convert TySan from function+module pass to just module pass (PR #120667)

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

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Vitaly Buka via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +using SanitizerMaskCutoffs = std::array; vitalybuka wrote: I was thinking what could be a better implementation to store values. I can be different dependi

[clang] [NFC][Driver] Define %{filecheck} as suggested on #121081 (PR #121159)

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

[clang] [NFC][Driver] Define %{filecheck} as suggested on #121081 (PR #121159)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121159 We will introduce `--implicit-check-not=libclang_rt` in #121081, this let us to avoid repeating the flag. >From 446e84807400a2b83462023fc4da9c56a794a61c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu,

[clang] [NFC][Driver] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121081 >From 75aa55a129dd1311a889a9bb4b0f4ee04206d157 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 24 Dec 2024 19:38:02 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?

[clang] [NFC][Driver] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121081 >From 75aa55a129dd1311a889a9bb4b0f4ee04206d157 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 24 Dec 2024 19:38:02 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [NFC][Driver] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121081 >From 75aa55a129dd1311a889a9bb4b0f4ee04206d157 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 24 Dec 2024 19:38:02 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [Driver] Fix implicit-check-not regex (PR #121221)

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

[clang] [Driver] Fix implicit-check-not regex (PR #121221)

2024-12-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121221 We need to exclude more than builtins, but it's tricky with FileCheck regex. So switching to list of libs we want to check. >From a2d45112466ba69eeb8ca9236469a653d6ff700c Mon Sep 17 00:00:00 2001 From: Vit

[clang] [Driver] Fix implicit-check-not regex (PR #121221)

2024-12-27 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @MaskRay in case you have a nicer suggestion how to implement this check in better way. I'd like to force match of all libclang_rt. except specific list. With `([^b]..|.[^u].|..[^i]).*` I can exclude only one, and expressions like `(?!(ABC|XYZ)).*`, are not supported https:

[clang] Reapply "[nfc][Driver] Remove {{(.exe)?}} from sanitizer test (#121160)" (PR #121162)

2024-12-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I've gone ahead and reverted it. Thanks for reverting. Could you please provide some information on how it fails? Error output would be enough. Upstream windows bot are OK. >Windows GetLinkerPath does append .exe How upstream bots pass? E.g. the one above is unrelated flak

[clang] Reapply "[nfc][Driver] Remove {{(.exe)?}} from sanitizer test (#121160)" (PR #121162)

2024-12-28 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I am puzzled by the description about Android. There is this configured buildkite https://buildkite.com/llvm-project/github-pull-requests/builds/132244 It's Windows, but only Android lines of the test fail. https://github.com/llvm/llvm-project/pull/121162 ___

[clang] [nfc][Driver] Remove {{(.exe)?}} from sanitizer test (PR #121160)

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

[clang] [NFC][Driver] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121081 >From 75aa55a129dd1311a889a9bb4b0f4ee04206d157 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 24 Dec 2024 19:38:02 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [nfc][Driver] Remove {{(.exe)?}} (PR #121160)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121160 These are not Windows tests >From 93627c9635328bc6ede1f667023732678679a378 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 26 Dec 2024 12:45:11 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=

[clang] [nfc][Driver] Remove {{(.exe)?}} from sanitizer test (PR #121160)

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

[clang] [NFC][Driver] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > We should avoid FILECHECK_OPTS. Consider using lit's `DEFINE:` feature. Done https://github.com/llvm/llvm-project/pull/121159 Also extracted unrelated #121160 https://github.com/llvm/llvm-project/pull/121081 ___ cfe-commits mailing

<    5   6   7   8   9   10   11   12   13   14   >