[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] [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] 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] [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] 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] [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] [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 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] [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 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] [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: I

[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] 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] [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] 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/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-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] [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] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-03 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. for compiler-rt/lib/sanitizer_common/CMakeLists.txt https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-03 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ping https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-03 Thread Vitaly Buka via cfe-commits
@@ -239,6 +239,11 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors +if (C

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2025-02-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: #104525 is still crashing, what we can do about that? https://github.com/llvm/llvm-project/pull/107153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: any way to avoid None? and new enum completely? E.g. Driver copy from another flag if this one is missing? https

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -1192,13 +1193,40 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; } +LangOptions::StrictFlexArraysLevelKind +CodeGenFunction::effectiveArrayBoundsFlexArraysLevel() { + using StrictFlexArraysLevelKind = LangOptions::StrictFlexArraysLevelKind; +

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: We can do the same in cc1, the case will not be used, because driver will always pass something? BTW, why -1 doe

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ping https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: All these changes are independent and quite straight forward. I'd suggest to split in some way, so it's easier to review, land, and revert if we miss and break something. Maybe by component. also globals vs function local etc. https://github.com/llvm/llvm-project/pull/12624

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Usually our tweak flags looks like -fsanitize-- "bounds" is a group for (array-bounds + local-bounds) "undefined" is also group, but we already have -fsanitize-undefined-, but they kind of affect a few sanitizers so: `-fsanitize-undefined-strict-flex-arrays` or `-fsanitize-a

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: To match numerical values, less mental efforts for readers. ``` enum class ArrayBoundsStrictFlexArraysLevelKind

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -7,6 +7,16 @@ // RUN: %clang_cc1 -emit-llvm -triple x86_64 -fstrict-flex-arrays=2 -fsanitize=array-bounds -x c++ %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT-2,CXX // RUN: %clang_cc1 -emit-llvm -triple x86_64 -fstrict-flex-arrays=3 -fsanitize=array-bounds

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -1192,13 +1193,40 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; } +LangOptions::StrictFlexArraysLevelKind +CodeGenFunction::effectiveArrayBoundsFlexArraysLevel() { + using StrictFlexArraysLevelKind = LangOptions::StrictFlexArraysLevelKind; +

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2025-02-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. We should abandon this in favor of proper fixes One case is here https://github.com/llvm/llvm-project/pull/126168 Not sure about other cases of https://github.com/llvm/llvm-project/issues/104525. https://github.com/llvm/llvm

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

2025-01-30 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] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Looks like from this patch https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
@@ -27,7 +27,7 @@ bool InterpState::inConstantContext() const { } InterpState::~InterpState() { - while (Current) { + while (Current && !Current->isBottomFrame()) { vitalybuka wrote: Some reordering is needed for "InterpState S;" and "InterpFrame BottomFram

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Looks like from this patch > https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio I see it's alread reverted and green. Still the URL with stack traces may help to fix the issue. https://github.com/llvm/llvm-project/pull/125253 ___

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

2024-12-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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 Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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/4] [NFC][clang] Add ubsan-handler-merge.c test to show absen

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

2024-12-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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/5] [NFC][clang] Add ubsan-handler-merge.c test to show absen

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

2024-12-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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/6] [NFC][clang] Add ubsan-handler-merge.c test to show absen

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

2024-12-09 Thread Vitaly Buka 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] Add ubsan-handler-merge.c test to show absence of nomerge (PR #119280)

2024-12-09 Thread Vitaly Buka 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] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

2024-12-11 Thread Vitaly Buka via cfe-commits
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); -if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) { vitalybuk

[clang] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

2024-12-11 Thread Vitaly Buka via cfe-commits
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); -if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) { PB.registerScalarOp

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

2024-12-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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] [llvm] [BoundsChecking] Add parameters to pass (PR #119894)

2024-12-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119894 >From 6cd26753f380d9ee89d85139a5dc58bc0e4b0632 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 13 Dec 2024 08:04:56 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

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

2024-12-18 Thread Vitaly Buka 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] [llvm] Revert "[InstCombine] Infer nuw for gep inbounds from base of object" (PR #120460)

2024-12-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/120460 ___ 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 Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/120370 >From 6787146cf0e81ad8a69b3b2fadd7caf0f49c78d9 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Tue, 17 Dec 2024 23:11:12 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?

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

2024-12-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed 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-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Vitaly Buka via cfe-commits
@@ -2548,6 +2548,14 @@ def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group; +def fsanitize_nonmerged_handlers_EQ +: CommaJoined<["-"], "fsanitize-nonmerged-handlers=">, vitalybuka wrote: How about just -fsanitize-merge (default)/-fno-sanitiz

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

2024-12-18 Thread Vitaly Buka 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-nonmerged-handlers (and -fno-sanitize-nonmerged-handlers) (PR #120464)

2024-12-18 Thread Vitaly Buka 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] [llvm] [BoundsChecking] Add parameters to pass (PR #119894)

2024-12-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed 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] [sanitizer] Refactor -f(no-)?sanitize-recover parsing (PR #119819)

2024-12-17 Thread Vitaly Buka 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] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I think > [llvm/llvm-test-suite#190](https://github.com/llvm/llvm-test-suite/pull/190) > should fix this issue, but haven't tested on an affected arch. > > I'm a bit worried that we don't have a sanitizer to catch this issue (the > negative left shift issue is an unrelated

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > > > Actually this PR is the case of > > > > https://lab.llvm.org/buildbot/#/builders/164/builds/3908, not #113491 > > > > > > > > > Sorry about that. > > > Are you able to dig up any of the cmake configure logs from these builds, > > > so that we can figure out how this

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: The problem is that some of check_cxx_source_compiles invocation does: ``` cat t.cpp int main() { } /usr/local/google/home/vitalybuka/tmp/bot/llvm_build0/bin/clang++ -fsanitize=memory -nostdlib++ -nostdinc++ -fuse-ld=lld t.cpp >> referenced by ubsan_type_hash_itanium.cp

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

2024-12-17 Thread Vitaly Buka via cfe-commits
@@ -317,7 +311,7 @@ static SanitizerMask parseSanitizeTrapArgs(const Driver &D, SanitizerMask AlwaysTrap; // Empty vitalybuka wrote: technically local-bounds is alwaystrap, but I working to change that. https://github.com/llvm/llvm-project/pull/119819 ___

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

2024-12-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ``` diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 89f1215afd0c..234c28bfd2c3 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -1083,10 +1083,11 @@ SanitizerArgs::SanitizerArgs(const ToolChai

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

2024-12-17 Thread Vitaly Buka 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 Vitaly Buka 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] [compiler-rt] [driver] Fix sanitizer libc++ runtime linking (PR #120370)

2024-12-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/120370 1. -f[no-]sanitize-link-c++-runtime suppose to override defauld behavior implied from `CCCIsCXX` 2. Take into account -nostdlib++ 3. Fix typo hasFlag vs hasArg. >From 6787146cf0e81ad8a69b3b2fadd7caf0f49c7

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

2024-12-17 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited 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] Reapply "[ubsan] Add -fsanitize-merge (and -fno-sanitize-merge) (#120…464)" (PR #120511)

2024-12-18 Thread Vitaly Buka 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 Vitaly Buka 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 Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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 Vitaly Buka via cfe-commits
@@ -696,6 +697,17 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, TrappingKinds &= Kinds; RecoverableKinds &= ~TrappingKinds; + // Parse -f(no-)?sanitize-nonmerged-handlers flags + SanitizerMask AlwaysMerge; // Empty vitalybuka wrote: ``` ``` San

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

2024-12-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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] [llvm] [ubsan] Add runtime test for -fsanitize=local-bounds (PR #120038)

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

[clang] [compiler-rt] [llvm] [ubsan] Add runtime test for -fsanitize=local-bounds (PR #120038)

2024-12-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/120038 >From b42a2ec4a07d94c6c0d73d4baedf2ffef3d3825c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sun, 15 Dec 2024 21:24:50 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [compiler-rt] [llvm] [ubsan] Add runtime test for -fsanitize=local-bounds (PR #120038)

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

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: #120370 was reverted, because libc++ tests expose major problem: Tests and likely many users can have `-nostdlib++ -lc++`. The if we remove c++ sanitizer runtimes from linking it will break them and force to add `-fsanitize-link-c++-runtime` I will reland unrelated parts of #1

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > #120370 was reverted, because libc++ tests expose major problem: > > Tests and likely many users can have `-nostdlib++ -lc++`. > > The if we remove c++ sanitizer runtimes from linking it will break them and > > force to add `-fsanitize-link-c++-runtime` > > That's indeed a

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

2024-12-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/119923 This check is a part of UBSAN, but does not support verbose output like other UBSAN checks. This is a step to fix that. >From 064dadb7544c00f810f08e11860f6c403a6f336a Mon Sep 17 00:00:00 2001 From: Vitaly B

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

2024-12-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119894 >From 6cd26753f380d9ee89d85139a5dc58bc0e4b0632 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 13 Dec 2024 08:04:56 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

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

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

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

2024-12-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Would be possible to switch DiagnosedAlwaysRecoverableKinds to this function? 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

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

2024-12-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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] [llvm] [rtsan][llvm] Remove function pass, only support module pass (PR #119739)

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

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

2024-12-13 Thread Vitaly Buka via cfe-commits
@@ -1286,6 +1286,33 @@ Expected parseRtSanPassOptions(StringRef Params) { return Result; } +Expected +parseBoundsCheckingOptions(StringRef Params) { + BoundsCheckingPass::ReportingMode Mode = + BoundsCheckingPass::ReportingMode::Trap; + while (!Params.empty()) { +

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

2024-12-13 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/119894 This check is a part of UBSAN, but does not support verbose output like other UBSAN checks. This is a step to fix that. >From 6cd26753f380d9ee89d85139a5dc58bc0e4b0632 Mon Sep 17 00:00:00 2001 From: Vitaly B

[clang] [llvm] [LLVM][rtsan] Add module pass to initialize rtsan (PR #118989)

2024-12-13 Thread Vitaly Buka via cfe-commits
@@ -1024,12 +1024,14 @@ void EmitAssemblyHelper::RunOptimizationPipeline( FPM.addPass(BoundsCheckingPass()); }); -if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) +if (LangOpts.Sanitize.has(SanitizerKind::Realtime)) { vitalybuk

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

2024-12-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119894 >From 6cd26753f380d9ee89d85139a5dc58bc0e4b0632 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 13 Dec 2024 08:04:56 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

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

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I made the followup for this one in #120572 Please severt and reland with followup. Followup is good way to go for trivial cases which can be landed with quick or no review https://github.com/llvm/llvm-project/pull/116462 ___ cfe-

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/120538 Remove item 2 from #120370 to avoid breaking libc++ tests. This reverts commit 60a2f32cf5ce75c9a2511d7fc2b0f24699605912. >From 17fe10b69951dc9f2cbeb0e4547515a6191cba2c Mon Sep 17 00:00:00 2001 From: Vitaly

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

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

[clang] Reapply "[driver] Fix sanitizer libc++ runtime linking (#120370)" (PR #120538)

2024-12-19 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/120538 ___ 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-20 Thread Vitaly Buka via cfe-commits
@@ -1208,6 +1202,11 @@ Sanitizers - Implemented ``-f[no-]sanitize-trap=local-bounds``, and ``-f[no-]sanitize-recover=local-bounds``. +- ``-fsanitize-merge`` (default) and ``-fno-sanitize-merge`` have been added for + fine-grained, unified control of which UBSan checks can

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

2024-12-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. 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 Vitaly Buka 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 Vitaly Buka 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 Vitaly Buka 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

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