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

2025-01-07 Thread Thurston Dang 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 Thurston Dang 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 Thurston Dang via cfe-commits
https://github.com/thurstond 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] [Drive] Fix test on Windows (PR #121162)

2024-12-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. 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 Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. 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 "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/125037 >From a5491f8a078f912c6a2de9b33f1915ca88e679d2 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 30 Jan 2025 07:04:13 + Subject: [PATCH 1/3] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to Lo

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/125037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Don't merge non-trap handlers if -ubsan-unique-traps or not optimized (PR #119302)

2024-12-10 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119280 >From 1b3a64701a8f496343360d8b6b86670f039a8e6d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Mon, 9 Dec 2024 22:38:30 + Subject: [PATCH 1/2] [NFC][clang] Add ubsan-handler-merge.c test to show absenc

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,113 @@ +// NOTE: Assertions have mostly been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// The most important assertion is the attributes at the end of the file, which +// shows that -ubsan-unique-traps does not attach 'nomerge' to each ubsa

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,113 @@ +// NOTE: Assertions have mostly been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// The most important assertion is the attributes at the end of the file, which +// shows that -ubsan-unique-traps does not attach 'nomerge' to each ubsa

[clang] [ubsan] Allow -ubsan-unique-traps option for ubsan min-rt (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119302 >From 0b45356af23201081e00ea278513520b8b0a7b49 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 10 Dec 2024 00:23:26 + Subject: [PATCH 1/5] [ubsan] Allow -ubsan-unique-traps option for ubsan min-rt

[clang] [ubsan] Allow -ubsan-unique-traps option for ubsan min-rt (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119302 >From 0b45356af23201081e00ea278513520b8b0a7b49 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 10 Dec 2024 00:23:26 + Subject: [PATCH 1/6] [ubsan] Allow -ubsan-unique-traps option for ubsan min-rt

[clang] [ubsan] Allow -ubsan-unique-traps option for non-trap handlers (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Allow -ubsan-unique-traps option for non-trap handlers (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Allow -ubsan-unique-traps option for non-trap handlers (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
@@ -3581,6 +3581,13 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF, llvm::AttributeList::FunctionIndex, B), /*Local=*/true); llvm::CallInst *HandlerCall = CGF.EmitNounwindRuntimeCall(Fn, FnArgs); + bool NoMerge = + ClSaniti

[clang] [ubsan] Allow -ubsan-unique-traps option for non-trap handlers (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Don't merge non-trap handlers if -ubsan-unique-traps or not optimized (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Don't merge non-trap handlers if -ubsan-unique-traps or not optimized (PR #119302)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119280 >From 1b3a64701a8f496343360d8b6b86670f039a8e6d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Mon, 9 Dec 2024 22:38:30 + Subject: [PATCH 1/3] [NFC][clang] Add ubsan-handler-merge.c test to show absenc

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Update ubsan-trap-merge.c test to show absence of nomerge in non-trap mode (PR #119280)

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/119280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-09 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/119280 This shows that ubsan handlers do not have nomerge attributes, even if -ubsan-unique-trap is enabled. 0d15d46362bd6ab5a9a2165805adaab13a7689f4 attaches nomerge but only for trap mode. ubsan-handler-merge.c

[clang] [llvm] [BoundsChecking] Add parameters to pass (PR #119894)

2024-12-15 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/119894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 1/6] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanit

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 1/7] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanit

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 1/5] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanit

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/10] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, thurstond wrote: Done https://github.com/llvm/llvm-project/pull/120464

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, + Group, + HelpText<"Enable non-merged handlers for specified sanitizers">;

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/11] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
@@ -68,6 +68,8 @@ static const SanitizerMask TrappingSupported = SanitizerKind::ImplicitConversion | SanitizerKind::Nullability | SanitizerKind::LocalBounds | SanitizerKind::CFI | SanitizerKind::FloatDivideByZero | SanitizerKind::ObjCCast; +static const SanitizerMas

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/12] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/13] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [driver] Fix sanitizer libc++ runtime linking (PR #120370)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/120370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/120464 …d-handlers) '-mllvm -ubsan-unique-traps' (https://github.com/llvm/llvm-project/pull/65972) applies to all UBSan checks. This patch introduces -fsanitize-nonmerged-handlers and -fno-sanitize-nonmerged-handle

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerge… (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 1/8] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-sanit

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/119819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119819 >From 9afe71655814ead9bd29acf5ebd515253777081d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 13 Dec 2024 05:14:56 + Subject: [PATCH 1/5] [sanitizer] Refactor -f(no-)?sanitize-recover parsing Thi

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
@@ -652,44 +679,12 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, // default in ASan? // Parse -f(no-)?sanitize-recover flags. - SanitizerMask RecoverableKinds = RecoverableByDefault | AlwaysRecoverable; - SanitizerMask DiagnosedUnrecoverableKinds; - SanitizerMask

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/119819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119819 >From 9afe71655814ead9bd29acf5ebd515253777081d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 13 Dec 2024 05:14:56 + Subject: [PATCH 1/7] [sanitizer] Refactor -f(no-)?sanitize-recover parsing Thi

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
@@ -247,49 +247,87 @@ static SanitizerMask setGroupBits(SanitizerMask Kinds) { return Kinds; } -// Computes the sanitizer mask based on the default plus opt-in (if supported) -// minus opt-out. +// Computes the sanitizer mask as: +// Default + Arguments (in or out) + Alw

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119819 >From 9afe71655814ead9bd29acf5ebd515253777081d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 13 Dec 2024 05:14:56 + Subject: [PATCH 1/4] [sanitizer] Refactor -f(no-)?sanitize-recover parsing Thi

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/119819 >From 9afe71655814ead9bd29acf5ebd515253777081d Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 13 Dec 2024 05:14:56 + Subject: [PATCH 1/2] [sanitizer] Refactor -f(no-)?sanitize-recover parsing Thi

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
@@ -247,48 +247,72 @@ static SanitizerMask setGroupBits(SanitizerMask Kinds) { return Kinds; } -// Computes the sanitizer mask based on the default plus opt-in (if supported) -// minus opt-out. +// Computes the sanitizer mask as: +// Default + AlwaysIn + Arguments - Alwa

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Thurston Dang via cfe-commits
@@ -247,48 +247,72 @@ static SanitizerMask setGroupBits(SanitizerMask Kinds) { return Kinds; } -// Computes the sanitizer mask based on the default plus opt-in (if supported) -// minus opt-out. +// Computes the sanitizer mask as: +// Default + AlwaysIn + Arguments - Alwa

[clang] Reapply "[ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120…464)" (PR #120511)

2024-12-18 Thread Thurston Dang via cfe-commits
@@ -1,10 +1,26 @@ // NOTE: Assertions have mostly been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// The most important assertion is the attributes at the end of the file, which -// shows whether -ubsan-unique-traps attaches 'nomerge' to each ubsan ca

[clang] Reapply "[ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120…464)" (PR #120511)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/120511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/18] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/14] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/15] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/16] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/17] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/120464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (PR #120464)

2024-12-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120464 >From 2c0da9aa6f58900387fa91cdc6bcb41e0235d94c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 18 Dec 2024 18:37:11 + Subject: [PATCH 01/19] [ubsan] Add -fsanitize-nonmerged-handlers (and -fno-san

[clang] 2691b96 - Revert "[ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120464)"

2024-12-18 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-12-18T23:50:01Z New Revision: 2691b964150c77a9e6967423383ad14a7693095e URL: https://github.com/llvm/llvm-project/commit/2691b964150c77a9e6967423383ad14a7693095e DIFF: https://github.com/llvm/llvm-project/commit/2691b964150c77a9e6967423383ad14a7693095e.diff LOG:

[clang] [NFCI][sanitizer] Refactor parseSanitizeTrapArgs (PR #119797)

2024-12-12 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/119797 parseSanitizeTrapArgs follows the general pattern of "compute the sanitizer mask based on the default plus opt-in (if supported) minus opt-out". This patch refactors the functionality into a generalized funct

[clang] [NFCI][sanitizer] Refactor parseSanitizeTrapArgs (PR #119797)

2024-12-12 Thread Thurston Dang via cfe-commits
thurstond wrote: > Would be possible to switch DiagnosedAlwaysRecoverableKinds to this function? That's a bit more complicated because it has Unrecoverable and AlwaysRecoverable error cases (vs. the current function only has one error case: ~Supported). I'll refactor RecoverableKinds in a foll

[clang] [NFCI][sanitizer] Refactor parseSanitizeTrapArgs (PR #119797)

2024-12-12 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/119797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-12 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/119819 This moves the functionality into a generic parseSanitizerArgs function, and then uses it for parsing both -f(no-)?sanitize-recover and -f(no-)?sanitize-trap. Note: for backwards compatibility, we compute th

[clang] [NFCI][sanitizer] Refactor parseSanitizeTrapArgs (PR #119797)

2024-12-12 Thread Thurston Dang via cfe-commits
thurstond wrote: > > Would be possible to switch DiagnosedAlwaysRecoverableKinds to this > > function? > > That's a bit more complicated because it has Unrecoverable and > AlwaysRecoverable error cases (vs. the current function only has one error > case: ~Supported). I'll refactor Recoverable

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Thurston Dang via cfe-commits
thurstond wrote: I've reverted it in https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1 to clear up some buildbots https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] 2b9abf0 - Revert "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (#116462)"

2024-12-19 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-12-19T17:02:16Z New Revision: 2b9abf0db2d106c7208b4372e662ef5df869e6f1 URL: https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1 DIFF: https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1.diff LOG:

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-20 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120682 >From ee51ed7bd68df7b2dae3f1426471b34d0388a42f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 20 Dec 2024 04:11:36 + Subject: [PATCH 1/5] Remove -bounds-checking-unique-traps (replace with -fno-s

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-20 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/120682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BoundsSan] Update BoundsChecking.cpp to use no-merge attribute where applicable (PR #120620)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120620 >From f7ede969c6d6a66d750bd420a15d7054b5848449 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 19 Dec 2024 18:46:38 + Subject: [PATCH] [BoundsSan] Update BoundsChecking.cpp to use no-merge attribu

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/120613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BoundsSan] Update BoundsChecking.cpp to use no-merge attribute where… (PR #120620)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/120620 … applicable https://github.com/llvm/llvm-project/pull/65972 introduced -ubsan-unique-traps and -bounds-checking-unique-traps, which attach the function size to the ubsantrap intrinsic. https://github.com/l

[clang] [llvm] [BoundsSan] Update BoundsChecking.cpp to use no-merge attribute where applicable (PR #120620)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/120613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BoundsSan] Update BoundsChecking.cpp to use no-merge attribute where applicable (PR #120620)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120613 >From 99ea8971602a0e1f3ecb2013fd0659b43ec145ce Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 19 Dec 2024 02:42:26 + Subject: [PATCH 1/3] [ubsan] Remove -ubsan-unique-traps (replace with -fno-san

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120613 >From 99ea8971602a0e1f3ecb2013fd0659b43ec145ce Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 19 Dec 2024 02:42:26 + Subject: [PATCH 1/2] [ubsan] Remove -ubsan-unique-traps (replace with -fno-san

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/120613 -fno-sanitize-merge (introduced in https://github.com/llvm/llvm-project/pull/120511) duplicates the functionality of -ubsan-unique-traps but also allows individual checks to be specified e.g., * "-fno-sanitiz

[clang] Reapply "[ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120…464)" (PR #120511)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -1,10 +1,26 @@ // NOTE: Assertions have mostly been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// The most important assertion is the attributes at the end of the file, which -// shows whether -ubsan-unique-traps attaches 'nomerge' to each ubsan ca

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -ubsan-unique-traps (replace with -fno-sanitize-merge) (PR #120613)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120613 >From 99ea8971602a0e1f3ecb2013fd0659b43ec145ce Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Thu, 19 Dec 2024 02:42:26 + Subject: [PATCH 1/4] [ubsan] Remove -ubsan-unique-traps (replace with -fno-san

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120682 >From ee51ed7bd68df7b2dae3f1426471b34d0388a42f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 20 Dec 2024 04:11:36 + Subject: [PATCH 1/4] Remove -bounds-checking-unique-traps (replace with -fno-s

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -445,9 +445,10 @@ New Compiler Flags - The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison starting from C++26, this warning is enabled as an error by default. -- '-fsanitize-merge' (default) and '-fno-sanitize-merge' have been added for -

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -488,8 +489,11 @@ Removed Compiler Flags derivatives) is now removed, since it's no longer possible to suppress the diagnostic (see above). Users can expect an `unknown warning` diagnostic if it's still in use. -- The experimental flag '-ubsan-unique-traps' has been re

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -5,6 +5,21 @@ ; RUN: opt < %s -passes='bounds-checking' -S | FileCheck %s --check-prefixes=RTABORT ; RUN: opt < %s -passes='bounds-checking' -S | FileCheck %s --check-prefixes=MINRT ; RUN: opt < %s -passes='bounds-checking' -S | FileCheck %s --check-prefixes=MIN

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -1281,31 +1281,43 @@ parseRegAllocFastPassOptions(PassBuilder &PB, StringRef Params) { return Opts; } -Expected +Expected parseBoundsCheckingOptions(StringRef Params) { - BoundsCheckingPass::ReportingMode Mode = - BoundsCheckingPass::ReportingMode::Trap; + Bounds

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
@@ -299,7 +303,7 @@ void BoundsCheckingPass::printPipeline( raw_ostream &OS, function_ref MapClassName2PassName) { static_cast *>(this)->printPipeline( OS, MapClassName2PassName); - switch (Mode) { + switch (Options.Mode) { thurstond wrote: Adde

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/120682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove -bounds-checking-unique-traps (replace with -fno-sanitize-merge=local-bounds) (PR #120682)

2024-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/120682 >From ee51ed7bd68df7b2dae3f1426471b34d0388a42f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Fri, 20 Dec 2024 04:11:36 + Subject: [PATCH 1/2] Remove -bounds-checking-unique-traps (replace with -fno-s

<    1   2   3   4   >