[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

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

[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

2025-01-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122994 >From 02c3d9ef1eb15b0d7ebe7511f200b7c00d52d6c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 14 Jan 2025 19:13:51 + Subject: [PATCH 1/3] Reapply "[sanitizer][NFCI] Add Options parameter to Lowe

[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

2025-01-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122994 >From 02c3d9ef1eb15b0d7ebe7511f200b7c00d52d6c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 14 Jan 2025 19:13:51 + Subject: [PATCH 1/2] Reapply "[sanitizer][NFCI] Add Options parameter to Lowe

[clang] [llvm] [NFC][BoundsChecking] Address #122576 review comments (PR #122773)

2025-01-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/122773 None >From b6abdc748225c29544d3c82bfafb5fac3dfd67a7 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 13 Jan 2025 11:30:49 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-10 Thread Vitaly Buka via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [NFCI][BoundsChecking] Apply nosanitize on local-bounds instrumentation (PR #122416)

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

[clang] [NFCI][BoundsChecking] Apply nosanitize on local-bounds instrumentation (PR #122416)

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

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

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

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122415 >From 0021fbc549fcc8c27b184af163ba963c31acc0c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 20:26:03 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?U

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-10 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Would it be useful to keep -fsanitize=...null and add local-bounds instead of > replacing null with local-bounds? It would make the test more rigorous and > also make the diff smaller. > > **edit:** or is it not possible to make a test case that is local-bounds > sanitized

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122415 >From 0021fbc549fcc8c27b184af163ba963c31acc0c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 20:26:03 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?U

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122415 >From 0021fbc549fcc8c27b184af163ba963c31acc0c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 20:26:03 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?U

[clang] [nfc][ubsan] Add local-bounds test (PR #122415)

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

[clang] [nfc][ubsan] Use O1 in test to remove more unrelated stuff (PR #122408)

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

[clang] [nfc][ubsan] Use O1 in test to remove more unrelated stuff (PR #122408)

2025-01-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122408 >From 5da780d61aaa329ec66c5a874caeb1de50969342 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 18:16:37 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-10 Thread Vitaly Buka via cfe-commits
@@ -3391,6 +3391,29 @@ static void findStoresToUninstrumentedArgAllocas( } } +StringRef getAllocaName(AllocaInst *AI) { + StringRef Name = AI->getName(); + + // Alloca could have been renamed for uniqueness. Its true name will have been + // recorded as an annotation. +

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-10 Thread Vitaly Buka via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [ubsan] Use SanitizerOrdinal instead of SanitizerMask for EmitCheck (exactly one sanitizer is required) (PR #122511)

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

[clang] [ubsan] Use SanitizerOrdinal instead of SanitizerMask for EmitCheck (exactly one sanitizer is required) (PR #122511)

2025-01-10 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I would describe reason as "to avoid ambiguity in EmitCheck about what to do if multiple bits are set". But your description is OK as well. https://github.com/llvm/llvm-project/pull/122511 ___ cfe-commits mailing list cfe-commits@lis

[clang] [ubsan] Use SanitizerOrdinal instead of SanitizerMask for EmitCheck (exactly one sanitizer is required) (PR #122511)

2025-01-10 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I assume this is NFC[I], please make it in title and there was not a single instance where >1 bits are set? https://github.com/llvm/llvm-project/pull/122511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] -ftime-report: reorganize timers (PR #122225)

2025-01-09 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Probably from the prev patch I have: ``` /usr/local/google/home/vitalybuka/src/llvm.git/llvm-project/clang/test/Frontend/ftime-report-template-decl.cpp:155:15: error: CHECK-DAG: expected string not found in input // CHECK-DAG: Code Generation Time ^ :75:32: note:

[clang] a4394d9 - [NFC][ubsan] Rename prefixes in test

2025-01-09 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2025-01-09T21:12:36-08:00 New Revision: a4394d9d42fb6e60e3702588fb56bec243038c49 URL: https://github.com/llvm/llvm-project/commit/a4394d9d42fb6e60e3702588fb56bec243038c49 DIFF: https://github.com/llvm/llvm-project/commit/a4394d9d42fb6e60e3702588fb56bec243038c49.diff L

[clang] [llvm] [nfc][BoundsChecking] Rename BoundsCheckingOptions into Options (PR #122359)

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

[clang] [llvm] [nfc][BoundsChecking] Refactor BoundsCheckingOptions (PR #122346)

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

[clang] [nfc][ubsan] Use O3 in test to remove more unrelated stuff (PR #122408)

2025-01-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/122408 >From 5da780d61aaa329ec66c5a874caeb1de50969342 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 18:16:37 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [nfc][ubsan] Use O3 in test to remove more unrelated stuff (PR #122408)

2025-01-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/122408 None >From 5da780d61aaa329ec66c5a874caeb1de50969342 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 9 Jan 2025 18:16:37 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?

[clang] [ubsan] Assert that each check only has one SanitizerKind (PR #122392)

2025-01-09 Thread Vitaly Buka via cfe-commits
@@ -3603,6 +3603,8 @@ void CodeGenFunction::EmitCheck( llvm::Value *TrapCond = nullptr; bool NoMerge = false; for (int i = 0, n = Checked.size(); i < n; ++i) { vitalybuka wrote: Maybe instead switch SanitizerMask -> SanitizerOrdinal? https://github.com/

[clang] [sanitizer] Parse weighted sanitizer args and -fsanitize-skip-hot-cutoff (PR #121619)

2025-01-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/121619 ___ 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-09 Thread Vitaly Buka via cfe-commits
@@ -2649,6 +2649,14 @@ 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] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -3430,13 +3430,25 @@ void FunctionStackPoisoner::processStaticAllocas() { SmallVector SVD; SVD.reserve(AllocaVec.size()); for (AllocaInst *AI : AllocaVec) { -ASanStackVariableDescription D = {AI->getName().data(), - ASan.getAllo

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

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

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @vitalybuka Should I also be dropping checks like > > https://github.com/llvm/llvm-project/blob/5f0db7c11264fa235d73730b2b93a31407dfbef3/compiler-rt/lib/ubsan/ubsan_handlers.cpp#L817-L818 > > from the ubsan runtime? (Not sure whether the runtime is supposed to also be > com

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I don't see (from description) why it's needed. https://github.com/llvm/llvm-project/pull/119387 ___ 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-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121619 ___ 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-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121619 ___ 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-08 Thread Vitaly Buka via cfe-commits
@@ -1154,3 +1154,56 @@ // RUN: not %clang --target=x86_64-linux-gnu -fsanitize=realtime,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-REALTIME-UBSAN // CHECK-REALTIME-UBSAN: error: invalid argument '-fsanitize=realtime' not allowed with '-fsanitize=undefined' +

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

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -1154,3 +1154,56 @@ // RUN: not %clang --target=x86_64-linux-gnu -fsanitize=realtime,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-REALTIME-UBSAN // CHECK-REALTIME-UBSAN: error: invalid argument '-fsanitize=realtime' not allowed with '-fsanitize=undefined' +

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

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -44,6 +92,19 @@ void clang::serializeSanitizerSet(SanitizerSet Set, #include "clang/Basic/Sanitizers.def" } +void clang::serializeSanitizerMaskCutoffs( +const SanitizerMaskCutoffs &Cutoffs, SmallVectorImpl &Values) { +#define SANITIZER(NAME, ID)

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

2025-01-08 Thread Vitaly Buka via cfe-commits
@@ -2649,6 +2649,14 @@ 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-07 Thread Vitaly Buka via cfe-commits
@@ -44,6 +92,19 @@ void clang::serializeSanitizerSet(SanitizerSet Set, #include "clang/Basic/Sanitizers.def" } +void clang::serializeSanitizerMaskCutoffs( +const SanitizerMaskCutoffs &Cutoffs, SmallVectorImpl &Values) { +#define SANITIZER(NAME, ID)

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

2025-01-07 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/121619 ___ 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
@@ -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] [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] [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] [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-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
@@ -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] [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-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] [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( 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
@@ -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] [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
@@ -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
@@ -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: float is probably enough https://github.com/llvm/llvm-project/pull/121619 __

[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] [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 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 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/3] 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
@@ -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
@@ -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] [Clang][test] Relax checking for libclang_rt.asan.so and libclang_rt.asan_static.a on arm android. (PR #121361)

2024-12-30 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/121361 ___ 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-30 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Is possible to share a link to the build bot? https://github.com/llvm/llvm-project/pull/121081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] 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] [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] [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] 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
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] [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] 5807d0e - [Drive] Don't match libclang_rt.builtins

2024-12-26 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-12-26T23:17:04-08:00 New Revision: 5807d0efb963ab591a1ae569b538724299d6acdc URL: https://github.com/llvm/llvm-project/commit/5807d0efb963ab591a1ae569b538724299d6acdc DIFF: https://github.com/llvm/llvm-project/commit/5807d0efb963ab591a1ae569b538724299d6acdc.diff L

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121115 ___ 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 closed https://github.com/llvm/llvm-project/pull/121081 ___ 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/6] =?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/5] =?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/4] =?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] Reapply "[nfc][Driver] Remove {{(.exe)?}} from sanitizer test (#121160)" (PR #121162)

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

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

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

[clang] [Drive] Fix test on Windows (PR #121162)

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

[clang] [Drive] Fix test on Windows (PR #121162)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121162 >From 5f3483085ac3547d443857d6ad320a35c9508198 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 26 Dec 2024 14:15:21 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] ca28fcc - Revert "[nfc][Driver] Remove {{(.exe)?}} from sanitizer test (#121160)"

2024-12-26 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-12-26T14:59:37-08:00 New Revision: ca28fcc6fce516129d117f5f5a14ba7f54a045d8 URL: https://github.com/llvm/llvm-project/commit/ca28fcc6fce516129d117f5f5a14ba7f54a045d8 DIFF: https://github.com/llvm/llvm-project/commit/ca28fcc6fce516129d117f5f5a14ba7f54a045d8.diff L

[clang] [Drive] Fix test on Windows (PR #121162)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121162 >From 5f3483085ac3547d443857d6ad320a35c9508198 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 26 Dec 2024 14:15:21 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [Drive] Fix test on Windows (PR #121162)

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

[clang] [Drive] Fix test on Windows (PR #121162)

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

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

2024-12-26 Thread Vitaly Buka via cfe-commits
@@ -8,7 +8,7 @@ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | %{filecheck} --check-prefix=CHECK-ASAN-LINUX // -// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld" vitalybuka wrote: It

[clang] [Drive] Fix test on Windows (PR #121162)

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

[clang] [Drive] Fix test on Windows (PR #121162)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/121162 Target "androideabi" adds .exe in some cases. >From 5f3483085ac3547d443857d6ad320a35c9508198 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 26 Dec 2024 14:15:21 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=

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

2024-12-26 Thread Vitaly Buka via cfe-commits
@@ -8,7 +8,7 @@ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | %{filecheck} --check-prefix=CHECK-ASAN-LINUX // -// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld" vitalybuka wrote: Lo

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

2024-12-26 Thread Vitaly Buka via cfe-commits
@@ -8,7 +8,7 @@ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | %{filecheck} --check-prefix=CHECK-ASAN-LINUX // -// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld" vitalybuka wrote: I

[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] Use global --implicit-check-not=libclang_rt (PR #121081)

2024-12-26 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/121081 ___ 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

[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?= =?

  1   2   3   4   5   6   7   8   9   10   >