[clang] [NFC] [BoundsSan] use structured bindings (PR #123228)

2025-01-16 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/123228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [BoundsSan] use structured bindings (PR #123228)

2025-01-16 Thread Florian Mayer via cfe-commits
https://github.com/fmayer ready_for_review https://github.com/llvm/llvm-project/pull/123228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [BoundsSan] use structured bindings (PR #123228)

2025-01-16 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/123228 This slightly simplifies the code. >From 010c9738c2182d3e269c305fd97dbb498a5dc717 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 16 Jan 2025 11:23:54 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2025-01-16 Thread Florian Mayer via cfe-commits
fmayer wrote: > Seems like the root cause was an vectorizer bug, sent > https://github.com/llvm/llvm-project/pull/120730 that fixes it. This is landed, so from that side we could reland this. https://github.com/llvm/llvm-project/pull/119225 ___ cfe-c

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-20 Thread Florian Mayer via cfe-commits
fmayer wrote: Seems like the root cause was an vectorizer bug, sent https://github.com/llvm/llvm-project/pull/120730 that fixes it. https://github.com/llvm/llvm-project/pull/119225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-19 Thread Florian Mayer via cfe-commits
fmayer wrote: I was working on this miscompile. I cannot give a reproducer right now, but the following observations: The generated IR is clearly incorrect (the `inbounds nuw`), of the form: ``` %x = alloca [12 x i32], align 16 [...] %59 = getelementptr inbounds nuw i8, ptr %x, i64 -4 %wide.ma

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-17 Thread Florian Mayer via cfe-commits
fmayer wrote: > > I had to do something very similar for CHERI downstream: We have to ensure > > that all globals are precisely representable (which may require rounding up > > the size+alignment) so you don't end up creating bounds that include > > adjacent ones. The original patch from 2019

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 Thread Florian Mayer via cfe-commits
@@ -0,0 +1,194 @@ +//===- unittests/Analysis/FlowSensitive/SmartPointerAccessorCachingTest.cpp ==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][dataflow] Add matchers for smart pointer accessors to be cached (PR #120102)

2024-12-17 Thread Florian Mayer via cfe-commits
@@ -0,0 +1,134 @@ +#include "clang/Analysis/FlowSensitive/SmartPointerAccessorCaching.h" + +#include "clang/AST/CanonicalType.h" +#include "clang/AST/DeclCXX.h" +#include "clang/ASTMatchers/ASTMatchers.h" +#include "clang/Basic/OperatorKinds.h" + +namespace clang::dataflow { + +na

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-17 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-16 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-16 Thread Florian Mayer via cfe-commits
@@ -2406,12 +2406,55 @@ void AsmPrinter::emitRemarksSection(remarks::RemarkStreamer &RS) { OutStreamer->emitBinaryData(Buf); } +static void tagGlobalDefinition(Module &M, GlobalVariable *G) { + Constant *Initializer = G->getInitializer(); + uint64_t SizeInBytes = + M

[clang] [rtsan][clang] NFC: Move rtsan init to addSanitizers (PR #119904)

2024-12-13 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/119904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-13 Thread Florian Mayer via cfe-commits
@@ -2406,12 +2406,55 @@ void AsmPrinter::emitRemarksSection(remarks::RemarkStreamer &RS) { OutStreamer->emitBinaryData(Buf); } +static void tagGlobalDefinition(Module &M, GlobalVariable *G) { + Constant *Initializer = G->getInitializer(); + uint64_t SizeInBytes = + M

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-13 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 error: too big or took too long to generate ___ 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 Florian Mayer via cfe-commits
https://github.com/fmayer 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] [rtsan][llvm] Remove functional pass, only support module pass (PR #119739)

2024-12-12 Thread Florian Mayer via cfe-commits
fmayer wrote: > Remove functional pass function pass? 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] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-12 Thread Florian Mayer via cfe-commits
@@ -808,6 +808,10 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { "visibility must be dso_local!", &GV); + if (GV.isTagged()) { fmayer wrote: The codegen has "is section == precisely honor alignment" ``` Align DataLayout::get

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Florian Mayer via cfe-commits
fmayer wrote: sorry, messed up the upload https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Florian Mayer via cfe-commits
fmayer wrote: @pcc does this look better now? https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-06 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/118989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-06 Thread Florian Mayer via cfe-commits
@@ -25,3 +25,7 @@ attributes #0 = { mustprogress noinline sanitize_realtime optnone ssp uwtable(sy ; RealtimeSanitizer pass should insert __rtsan_realtime_exit right before function return ; CHECK: call{{.*}}@__rtsan_realtime_exit ; CHECK-NEXT: ret{{.*}}void + +; RealtimeSani

[clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-22 Thread Florian Mayer via cfe-commits
fmayer wrote: Fails buildbot: https://lab.llvm.org/buildbot/#/builders/24/builds/2791/steps/10/logs/stdio ``` -- Testing: 83950 of 83951 tests, 48 workers -- Testing: 0.. 10.. FAIL: Clang :: Preprocessor/has_builtin_cpuid.c (15996 of 83950) TEST 'Clang :: Preprocessor/has_

[clang] [rtsan] NFC: Update docs with suppress_equal_stacks (PR #117187)

2024-11-21 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/117187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]remove deps of clang in clang tidy test (PR #116588)

2024-11-20 Thread Florian Mayer via cfe-commits
fmayer wrote: > LLVM Buildbot has detected a new failure on builder > `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot11` > while building `clang-tools-extra` at step 2 "annotate". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/55/builds

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

2024-11-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/116302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-11-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-11-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-11-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/113979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Florian Mayer via cfe-commits
@@ -11,11 +11,16 @@ RealtimeSanitizer (a.k.a. RTSan) is a real-time safety testing tool for C and C+ projects. RTSan can be used to detect real-time violations, i.e. calls to methods that are not safe for use in functions with deterministic run time requirements. RTSan consi

[clang] [rtsan][asan] NFC Fix hyperlink to CMake doc (PR #113931)

2024-10-28 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/113931 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-24 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/112457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan][NFC] Documentation of suppression flag (PR #112727)

2024-10-23 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/112727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-23 Thread Florian Mayer via cfe-commits
fmayer wrote: > I think this is the right change. > > What I don't understand, though, is why you were getting an assert failure > before. (Which line is the assertion on that failed?) I would have thought if > you don't dump the nested record, you just get less information. Apparently > not

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-22 Thread Florian Mayer via cfe-commits
fmayer wrote: > I would suggest a brief comment explaining the choice not to filter. I'm not sure I understand. There wasn't a choice to filter before, there was just the (incorrect) assumption that we don't have nested `RecordStorageLocation`, leading to a crash. https://github.com/llvm/llvm

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); fmayer wrote:

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-21 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,18 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); // If the alignment is spe

[clang] [rtsan][NFC] Documentation of suppression flag (PR #112727)

2024-10-17 Thread Florian Mayer via cfe-commits
@@ -194,12 +198,43 @@ Some issues with flags can be debugged using the ``verbosity=$NUM`` flag: misspelled_flag ... -Disabling -- +Disabling and suppressing +- -In some circumstances, you may want to suppress error reporting in a specif

[clang] [rtsan][NFC] Documentation of suppression flag (PR #112727)

2024-10-17 Thread Florian Mayer via cfe-commits
@@ -194,12 +198,43 @@ Some issues with flags can be debugged using the ``verbosity=$NUM`` flag: misspelled_flag ... -Disabling -- +Disabling and suppressing +- -In some circumstances, you may want to suppress error reporting in a specif

[clang] [rtsan][NFC] Documentation of suppression flag (PR #112727)

2024-10-17 Thread Florian Mayer via cfe-commits
@@ -194,12 +198,43 @@ Some issues with flags can be debugged using the ``verbosity=$NUM`` flag: misspelled_flag ... -Disabling -- +Disabling and suppressing +- -In some circumstances, you may want to suppress error reporting in a specif

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread Florian Mayer via cfe-commits
fmayer wrote: An example dump that is now possible but crashed before ![image](https://github.com/user-attachments/assets/21e4ce35-4bf2-41dd-9a65-32dedb82723a) https://github.com/llvm/llvm-project/pull/112457 ___ cfe-commits mailing list cfe-commits@l

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/112457 We have an internal analysis that uses them, and the HTML dump would fail on the assertion. >From 4264fe1dfed3fc54f339ad4a769d76158c5ee7d5 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 15 Oct 2024 17:

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-15 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,17 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); // If the alignment is spe

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-15 Thread Florian Mayer via cfe-commits
@@ -764,11 +764,17 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { const DataLayout &DL = GV->getDataLayout(); uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); + if (GV->isTagged()) +Size = alignTo(Size, 16); // If the alignment is spe

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-14 Thread Florian Mayer via cfe-commits
https://github.com/fmayer ready_for_review https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [MTE] Use aarch64-linux-android34 for globals test (PR #112050)

2024-10-14 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/112050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [MTE] Use aarch64-linux-android34 for globals test (PR #112050)

2024-10-14 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/112050 >From 78e91cb54bed6ee8deda61a054776bbd3102d79d Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 11 Oct 2024 14:28:59 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [NFC] [MTE] Use aarch64-linux-android34 for globals test (PR #112050)

2024-10-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/112050 >From 78e91cb54bed6ee8deda61a054776bbd3102d79d Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 11 Oct 2024 14:28:59 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [NFC] [MTE] Use aarch64-linux-android34 for globals test (PR #112050)

2024-10-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/112050 It doesn't make a difference currently, but MTE globals are only supported on Android, so that's the more natural target to use. >From 78e91cb54bed6ee8deda61a054776bbd3102d79d Mon Sep 17 00:00:00 2001 From: Flor

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/111918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [llvm] Apply alignment / size in linker rather than IR (PR #111918)

2024-10-10 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/111918 This greatly simplifies the code, and makes sure no optimizations are applied that assume the bigger alignment or size, which could be incorrect if we link together with non-instrumented code. >From 3a962270521a

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

2024-10-08 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-08 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/111055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
fmayer wrote: > > > With the function effects warnings (as errors) activated, blocking > > > functions cannot be called from non-blocking functions, and this is > > > enforced at compile time. The purpose of this series of PRs is to > > > introduce similar functionality into RealtimeSanitizer,

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-03 Thread Florian Mayer via cfe-commits
fmayer wrote: > With the function effects warnings (as errors) activated, blocking functions > cannot be called from non-blocking functions, and this is enforced at compile > time. The purpose of this series of PRs is to introduce similar functionality > into RealtimeSanitizer, so that it can

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

2024-09-30 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. LGTM % vitaly's comment https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/110296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,75 @@ non-zero exit code. #14 0x0001958960dc () #15 0x2f557ffc () +Run-time flags +-- + +RealtimeSanitizer supports a number of run-time flags, which can be specified in the ``RTSAN_OPTIONS`` environment variable: + +.. code-block::

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,75 @@ non-zero exit code. #14 0x0001958960dc () #15 0x2f557ffc () +Run-time flags +-- + +RealtimeSanitizer supports a number of run-time flags, which can be specified in the ``RTSAN_OPTIONS`` environment variable: + +.. code-block::

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,75 @@ non-zero exit code. #14 0x0001958960dc () #15 0x2f557ffc () +Run-time flags +-- + +RealtimeSanitizer supports a number of run-time flags, which can be specified in the ``RTSAN_OPTIONS`` environment variable: + +.. code-block::

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,75 @@ non-zero exit code. #14 0x0001958960dc () #15 0x2f557ffc () +Run-time flags +-- + +RealtimeSanitizer supports a number of run-time flags, which can be specified in the ``RTSAN_OPTIONS`` environment variable: + +.. code-block::

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-09-25 Thread Florian Mayer via cfe-commits
@@ -489,13 +485,7 @@ static DiagnosticIDs::Level toLevel(diag::Severity SV) { DiagnosticIDs::Level DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc, const DiagnosticsEngine &Diag) const { - // Handle custom diagnostics, wh

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-25 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: Thanks, otherwise this comment will only cause confusion. https://github.co

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: Sorry, the implication of my comment was: explain why in a comment, because

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: why are we only testing one of those? https://github.com/llvm/llvm-project/

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,28 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer + // type, so we suggest replacing it with nullptr. + void f() { x = __null; } + // CHECK-MESSAGES: :[[@L

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,14 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + T x; +}; +void test_templated() { + pear p = { NULL }; fmayer wrote: Doesn't this need some `CHECK` or `CHECK-NOT`? https://github.com/llvm/llvm-project/pull/1091

[clang] Revert "[clang] Silence GCC warnings about control reaching end of non void function" (PR #108646)

2024-09-13 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/108646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] e1bd974 - Revert "Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (#108453)"

2024-09-13 Thread Florian Mayer via cfe-commits
Author: Florian Mayer Date: 2024-09-13T15:01:33-07:00 New Revision: e1bd9740faa62c11cc785a7b70ec1ad17e286bd1 URL: https://github.com/llvm/llvm-project/commit/e1bd9740faa62c11cc785a7b70ec1ad17e286bd1 DIFF: https://github.com/llvm/llvm-project/commit/e1bd9740faa62c11cc785a7b70ec1ad17e286bd1.diff

[clang] e1bd974 - Revert "Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (#108453)"

2024-09-13 Thread Florian Mayer via cfe-commits
Author: Florian Mayer Date: 2024-09-13T15:01:33-07:00 New Revision: e1bd9740faa62c11cc785a7b70ec1ad17e286bd1 URL: https://github.com/llvm/llvm-project/commit/e1bd9740faa62c11cc785a7b70ec1ad17e286bd1 DIFF: https://github.com/llvm/llvm-project/commit/e1bd9740faa62c11cc785a7b70ec1ad17e286bd1.diff

[clang] f885e02 - Revert "[clang] Silence GCC warnings about control reaching end of non void function"

2024-09-13 Thread Florian Mayer via cfe-commits
Author: Florian Mayer Date: 2024-09-13T15:01:27-07:00 New Revision: f885e02cf7cac1b08cab4cd526773420076029dd URL: https://github.com/llvm/llvm-project/commit/f885e02cf7cac1b08cab4cd526773420076029dd DIFF: https://github.com/llvm/llvm-project/commit/f885e02cf7cac1b08cab4cd526773420076029dd.diff

[clang] Revert "[clang] Silence GCC warnings about control reaching end of non void function" (PR #108646)

2024-09-13 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/108646 This reverts commit 90a2e0bb423629b7e70f4b91adb44851199dd5ea. Reverting parent CL >From 6bc1ea84e078d01546286e6443d761e2a685902d Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 13 Sep 2024 14:02:14 -07

[clang] [clang-tools-extra] [flang] Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (PR #108453)

2024-09-13 Thread Florian Mayer via cfe-commits
fmayer wrote: This caused a UBSan violation: ``` [--] 1 test from ConfigCompileTests [ RUN ] ConfigCompileTests.DiagnosticSuppression Config fragment: compiling :0 -> 0x7B8366E2F7D8 (trusted=false) /usr/local/google/home/fmayer/large/llvm-project/llvm/include/llvm/ADT/IntrusiveR

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

2024-09-09 Thread Florian Mayer via cfe-commits
fmayer wrote: LGTM, but would like @vitalybuka to also take a quick look. https://github.com/llvm/llvm-project/pull/104741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-04 Thread Florian Mayer via cfe-commits
fmayer wrote: super-nit: add `[sanitizers]` and remove `.` from commit message? https://github.com/llvm/llvm-project/pull/107280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-04 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/107280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "Reapply "[HWASan] remove incorrectly inferred attributes" (#106622)" (PR #106758)

2024-08-30 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/106758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[HWASan] remove incorrectly inferred attributes" (#106622) (PR #106624)

2024-08-29 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/106624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-23 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. LGTM for the hwasan test. https://github.com/llvm/llvm-project/pull/105754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-23 Thread Florian Mayer via cfe-commits
@@ -1,8 +1,9 @@ -// RUN: %clang_hwasan -Wl,--build-id -g %s -o %t -// RUN: echo '[{"prefix": "'"$(realpath $(dirname %s))"'/", "link": "http://test.invalid/{file}:{line}"}]' > %t.linkify -// RUN: %env_hwasan_opts=symbolize=0 not %run %t 2>&1 | hwasan_symbolize --html --symbols $

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

2024-08-13 Thread Florian Mayer via cfe-commits
@@ -313,6 +313,14 @@ Limitations usually expected. * Static linking of executables is not supported. +Security Considerations +=== + +AddressSanitizer is a bug detection tool and is not meant to be linked fmayer wrote: nit: maybe "its ru

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

2024-08-12 Thread Florian Mayer via cfe-commits
fmayer wrote: > ⚠️ We detected that you are using a GitHub private e-mail address to > contribute to the repo. Please turn off [Keep my email addresses > private](https://github.com/settings/emails) setting in your account. See > [LLVM > Discourse](https://discourse.llvm.org/t/hidden-emails-o

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

2024-08-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-20 Thread Florian Mayer via cfe-commits
fmayer wrote: Breakage looks related: https://lab.llvm.org/buildbot/#/builders/72/builds/265 ``` FAIL: UBSan-MemorySanitizer-powerpc64le :: TestCases/Integer/bit-int.c (4716 of 4745) TEST 'UBSan-MemorySanitizer-powerpc64le :: TestCases/Integer/bit-int.c' FAILED ***

  1   2   >