https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/75721
I found this handy for situations where you want to pass in a config file and
not rely on a default `.clang-tidy` file.
The new option is `-config` and will expect something that can be passed into
the `--confi
cjappl wrote:
@njames93 friendly ping for a review on this PR. Thank you in advance!
https://github.com/llvm/llvm-project/pull/75721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/75721
>From 433f4ac919a6967c278e56a19b5824e474ebd907 Mon Sep 17 00:00:00 2001
From: Chris Apple <14171107+cja...@users.noreply.github.com>
Date: Sat, 16 Dec 2023 15:53:56 -0800
Subject: [PATCH 1/2] Add ability to pass in
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/75721
>From 433f4ac919a6967c278e56a19b5824e474ebd907 Mon Sep 17 00:00:00 2001
From: Chris Apple <14171107+cja...@users.noreply.github.com>
Date: Sat, 16 Dec 2023 15:53:56 -0800
Subject: [PATCH 1/3] Add ability to pass in
cjappl wrote:
@MichaelLettrich I just realized I submitted basically the same PR as you!
Great minds think alike. I found yours when I searched.
https://github.com/llvm/llvm-project/pull/75721
In this PR I added to the release notes, feel free to steal them if you want. I
would love this feat
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/75721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
This is almost exactly the same as #75457 , just with the release notes. I'm
going to close this for now and re-open it if that one gets stale.
https://github.com/llvm/llvm-project/pull/75721
___
cfe-commits mailing list
cfe-commits@list
cjappl wrote:
Pinging reviewers @vitalybuka @MaskRay @zygoloid
All the comments on this PR have been addressed, looking for more feedback, or
approval/merge if we are getting close! Thanks in advance :)
https://github.com/llvm/llvm-project/pull/92460
__
cjappl wrote:
> clangDriver changes are usually the last. The expectation is that if
> -fsanitize=realtime does not return an error, there should be some basic
> functionality.
Thanks for the feedback @MaskRay . I removed all of the clang components of
this review, leaving only the compiler-r
@@ -0,0 +1,67 @@
+import os
+
+# Setup config name.
+config.name = "RTSAN" + config.name_suffix
+
+# Setup source root.
+config.test_source_root = os.path.dirname(__file__)
+
+# Setup default compiler flags use with -frtsan-instrument option.
+clang_rtsan_cflags = ["-frtsan-instru
cjappl wrote:
Pinging reviewers @vitalybuka @zygoloid
State of the review: 1 approval from MaskRay, all open comments have been
addressed. Looking for more feedback, or more approval or a merge if this is
looking good.
Thanks much! :)
https://github.com/llvm/llvm-project/pull/92460
_
@@ -0,0 +1,516 @@
+//===--- rtsan_test_interceptors.cpp - Realtime Sanitizer ---*- C++
-*-===//
+//
+// 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
cjappl wrote:
Just saw the test failure, but it is unrelated:
```
_bk;t=1725300551284FAIL: lld :: ELF/avr-reloc.s (84796 of 87084)
_bk;t=1725300551284 TEST 'lld :: ELF/avr-reloc.s' FAILED
```
https://github.com/llvm/llvm-project/pull/106736
___
cjappl wrote:
Weekly ping of reviewers - also added a couple more folks if they have time to
take a look.
Current state: no reviews
https://github.com/llvm/llvm-project/pull/106650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
cjappl wrote:
Oh, also cc @davidtrevelyan
https://github.com/llvm/llvm-project/pull/106650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl edited
https://github.com/llvm/llvm-project/pull/106650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
Weekly reviewer ping @vitalybuka @MaskRay @pcc
https://github.com/llvm/llvm-project/pull/106736
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
Hi @dougsonos
We’re experiencing an unforeseen pain point trying to use rtsan without
function effects, and wanted to ask **how you would feel about making function
effect warnings opt-in rather than opt-out.**
While users can easily opt in to function effects and not rtsan, t
@@ -54,6 +54,8 @@ FEATURE(memtag_globals,
FEATURE(xray_instrument, LangOpts.XRayInstrument)
FEATURE(undefined_behavior_sanitizer,
LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined))
+FEATURE(realtime_sanitizer,
cjappl wrote:
https://github.com/llvm/l
@@ -54,6 +54,8 @@ FEATURE(memtag_globals,
FEATURE(xray_instrument, LangOpts.XRayInstrument)
FEATURE(undefined_behavior_sanitizer,
LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined))
+FEATURE(realtime_sanitizer,
cjappl wrote:
But not merged yet, waiti
cjappl wrote:
> My sense is that it would be weird for -Wall not to include
> -Wfunction-effects, but that it would be OK for -Wfunction-effects not to be
> enabled by default.
I do agree, it seems reasonable for it to be in `-Wall` or similar! That is
absolutely what I'd expect as a user :)
https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/107707
None
>From e3e211f65afbc923299c0f413d2c50c7b00884b6 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Sat, 7 Sep 2024 08:38:06 -0700
Subject: [PATCH] [NFC][rtsan] Docs of how to disable rtsan
---
clang/docs/Rea
cjappl wrote:
CC for review @davidtrevelyan
https://github.com/llvm/llvm-project/pull/107707
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/107707
>From e3e211f65afbc923299c0f413d2c50c7b00884b6 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Sat, 7 Sep 2024 08:38:06 -0700
Subject: [PATCH 1/2] [NFC][rtsan] Docs of how to disable rtsan
---
clang/docs/Realt
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/107707
>From e3e211f65afbc923299c0f413d2c50c7b00884b6 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Sat, 7 Sep 2024 08:38:06 -0700
Subject: [PATCH 1/3] [NFC][rtsan] Docs of how to disable rtsan
---
clang/docs/Realt
https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/102622
Introduce the `-fsanitize=realtime` flag in clang driver
Plug in the RealtimeSanitizer PassManager pass in Codegen, and attribute a
function based on if it has the `[[clang::nonblocking]]` function effect.
>Fr
cjappl wrote:
I was not able to figure out a way to separate the CodeGen from the driver,
seeing as the codegen only happens when the sanitizer is enabled. This means to
write unit tests for the CodeGen, I needed the -fsanitize=realtime flag. If
someone has advice on how to get around this pro
@@ -845,6 +845,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
QualType RetTy,
if (SanOpts.has(SanitizerKind::ShadowCallStack))
Fn->addFnAttr(llvm::Attribute::ShadowCallStack);
+ if (SanOpts.has(SanitizerKind::Realtime)) {
+for (const FunctionEffectWithCon
@@ -995,6 +996,13 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
FPM.addPass(BoundsCheckingPass());
});
+if (LangOpts.Sanitize.has(SanitizerKind::Realtime))
+ PB.registerScalarOptimizerLateEPCallback(
cjappl wrote:
I am co
@@ -552,11 +552,15 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
SanitizerKind::Leak | SanitizerKind::Thread |
SanitizerKind::Memory | SanitizerKind::KernelAddress |
SanitizerKind::Scudo | Sanitiz
cjappl wrote:
Pinging for a possible review:
@Sirraide @AaronBallman @MaskRay @vitalybuka @dougsonos
Co-Author @davidtrevelyan
https://github.com/llvm/llvm-project/pull/102622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.ll
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 00d75e70c55e1e0c0b57a6402a9d02604a35dba6 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/2] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
@@ -845,6 +845,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
QualType RetTy,
if (SanOpts.has(SanitizerKind::ShadowCallStack))
Fn->addFnAttr(llvm::Attribute::ShadowCallStack);
+ if (SanOpts.has(SanitizerKind::Realtime)) {
+for (const FunctionEffectWithCon
https://github.com/cjappl edited
https://github.com/llvm/llvm-project/pull/102622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/3] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/4] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/5] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/6] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/3] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
cjappl wrote:
(Sorry for the "double ping", I just got commit powers, so adding people to the
review explicitly)
https://github.com/llvm/llvm-project/pull/102622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/102622
>From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Wed, 24 Jul 2024 14:25:44 -0700
Subject: [PATCH 1/4] [clang][rtsan] Introduce realtime sanitizer codegen and
driver
cjappl wrote:
Hi @dougsonos
Seeing a possible bug when using `malloc` in a [[nonallocating]] context.
Specifically this test program (partially stolen from one of your test cases)
```cpp
#include
void nb4_inline() {}
void nb4_not_inline();
void nb4() noexcept [[clang::nonallocating]]
{
fl
cjappl wrote:
> exceptions to "built-in functions are always safe"
aha! I missed this was part of the plan to begin with, that makes sense.
This latest commit fixed my example. Code throws a warning as expected!
https://github.com/llvm/llvm-project/pull/99656
__
@@ -1509,6 +1511,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList
&Args,
AddLinkSanitizerLibArgs(Args, CmdArgs, "asan");
}
cjappl wrote:
Thanks for catching this! Added a few basic ones that test that the flag is
supported, and that s
cjappl wrote:
Pinging reviewers, after we had more conversations on the overall structure and
usefulness of RTSan, and it was approved.
@zygoloid @vitalybuka @MaskRay
Details of the aforementioned discussion are around here in the discourse
thread:
https://discourse.llvm.org/t/rfc-nolock-an
cjappl wrote:
Ping
@yln @vitalybuka @Sirraide @AaronBallman @zygoloid @compnerd @petrhosek
@isanbard @MaskRay
https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
Hi @Endilll
I did a git bisect that pointed to this change as the one blocking my
compilation on an Ubuntu docker image with clang 14.0
The error I see:
```
CMake Error at
/test_radsan/llvm-project/compiler-rt/cmake/Modules/CheckSectionExists.cmake:72
(message):
cc: error:
cjappl wrote:
Thanks for your help! You were correct that cc was pointing to gcc. This is
fixed when I updated my machine to use my known clang as the default compiler.
For future archeologists, this meant (from [this
answer](https://askubuntu.com/questions/1198087/how-to-set-clang-9-as-the-de
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/100120
>From e0a1336da28f0f1d9f870be1676991d415160321 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 18 Jul 2024 17:29:01 +0200
Subject: [PATCH 1/2] [rtsan] Introduce rtsan frontend
---
clang/include/clang/Basi
https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/100192
Inserts the `__rtsan_realtime_enter` at the first line of all functions with
[[clang::nonblocking]] function effects, and `__rtsan_realtime_exit` at all
exit points.
Introduces the -fsanitize=realtime flag, and
cjappl wrote:
CC for review @MaskRay @vitalybuka @AaronBallman @Sirraide @rjmccall
@erichkeane @davidtrevelyan @dougsonos
https://github.com/llvm/llvm-project/pull/100192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/cjappl closed
https://github.com/llvm/llvm-project/pull/100120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
Closing in favor of these two reviews to begin with, a 3rd will be added with
the lit test components after these are merged:
1. Fixing unit test intermittent failure on mac:
https://github.com/llvm/llvm-project/pull/100188
2. clang codegen component https://github.com/llvm/llvm-
@@ -1410,6 +1414,35 @@ QualType
CodeGenFunction::BuildFunctionArgList(GlobalDecl GD,
return ResTy;
}
+void InsertCallBeforeInstruction(llvm::Function *Fn,
cjappl wrote:
> Also maybe I missed some discussion. these changes looks like better be done
> by ll
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/100192
>From 0307f457862e4a7ef623a74690422eb1425f1067 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 18 Jul 2024 17:29:01 +0200
Subject: [PATCH 1/2] [rtsan] Introduce rtsan clang codegen
---
clang/include/clang
cjappl wrote:
Thanks to the feedback from @MaskRay and @vitalybuka , closing in favor of
doing this processing in LLVM. (PR:
https://github.com/llvm/llvm-project/pull/100596)
The clang driver changes will come after that is merged! Appreciate all the
reviews setting us on the right path.
ht
https://github.com/cjappl closed
https://github.com/llvm/llvm-project/pull/100192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl approved this pull request.
Seems reasonable to me, I would wait for other approvals, as I'm relatively new
here.
Just ensure this is good to go with rtsan, I recommend running the tests
locally, as I don't think they're a part of the default pre-commit set
```
ninja
https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/106650
None
>From 4af0857bd8f2cb332a1ee7b359002ed6522d1aa8 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 29 Aug 2024 17:16:37 -0700
Subject: [PATCH] [clang][rtsan] Add realtime sanitizer to Features.def
---
c
cjappl wrote:
> I'm seeing a test failure but I'm not sure if it's an issue with RTSan or
> compiler-rt atomic implementation:
Interesting, so that test basically tests that large atomics that insert locks
under the hood die as expected. Zooming in on the second part of the test:
```
std::at
https://github.com/cjappl created
https://github.com/llvm/llvm-project/pull/106736
Follows #106650 - that's why that change is in this PR, that will disappear
when that is approved and merged.
To disable rtsan, we are following the same approach as lsan:
https://github.com/llvm/llvm-project/
cjappl wrote:
CC @davidtrevelyan for review
https://github.com/llvm/llvm-project/pull/106736
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/106736
>From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 29 Aug 2024 17:16:37 -0700
Subject: [PATCH 1/3] [clang][rtsan] Add realtime sanitizer to Features.def
---
cla
@@ -0,0 +1,117 @@
+//===-- sanitizer/rtsan_interface.h -*- C++
-*-===//
+//
+// 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
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/106736
>From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 29 Aug 2024 17:16:37 -0700
Subject: [PATCH 1/4] [clang][rtsan] Add realtime sanitizer to Features.def
---
cla
https://github.com/cjappl deleted
https://github.com/llvm/llvm-project/pull/106736
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,117 @@
+//===-- sanitizer/rtsan_interface.h -*- C++
-*-===//
+//
+// 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
@@ -0,0 +1,117 @@
+//===-- sanitizer/rtsan_interface.h -*- C++
-*-===//
+//
+// 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
cjappl wrote:
Ok, it appears that on Apple systems, we would catch this, as we intercept
OSSpinLockLock used by compiler-rt atomics:
https://github.com/llvm/llvm-project/blob/c55e24b8507d47a8cc04b5d9570e8e3d02be1ca3/compiler-rt/lib/builtins/atomic.c#L95-L102
But, in the non-darwin case this is
cjappl wrote:
> but it'd be better if we handled atomic CAS spinlocks as well since we would
> like to avoid the pthread dependency if possible.
Agreed, I have something in the works for this but it is a little ways off.
(catching these unbound loops is a bit tricky)
My recommendation to make
https://github.com/cjappl updated
https://github.com/llvm/llvm-project/pull/106736
>From c9d3d6c256b763bc99e7bf2d2dca43cb1e88adb8 Mon Sep 17 00:00:00 2001
From: Chris Apple
Date: Thu, 29 Aug 2024 17:16:37 -0700
Subject: [PATCH 1/6] [clang][rtsan] Add realtime sanitizer to Features.def
---
cla
@@ -0,0 +1,117 @@
+//===-- sanitizer/rtsan_interface.h -*- C++
-*-===//
+//
+// 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
cjappl wrote:
Also, just as a heads up, neither of the authors have commit access as we are
new to LLVM. If this is OK to go in we will need help with that step.
https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits
cjappl wrote:
> I can reproduce and will debug in an hour.
Thanks for the help @vitalybuka , I am looking into this as well, but very
grateful for more experienced eyes on the matter too. I'll keep you posted here
if I find anything
https://github.com/llvm/llvm-project/pull/92460
cjappl wrote:
There are 3 errors I see:
Mostly it's this `llvm_gtest` issue:
```
ninja: error: 'compiler-rt/lib/rtsan/tests/llvm_gtest', needed by
'compiler-rt/lib/rtsan/tests/RtsanNoInstTestObjects.rtsan_preinit.cpp.x86_64.o',
missing and no known rule to make it
```
On fuchsia it is a param
cjappl wrote:
This patch I have a strong hunch fixes issue 1 in my comment above. This patch
compiles and runs on my linux container and my mac, proving it doesn't affect
compilation on those two systems.
```
diff --git a/compiler-rt/lib/rtsan/tests/CMakeLists.txt
b/compiler-rt/lib/rtsan/test
cjappl wrote:
> This also breaks building the compiler-rt for older android versions, because
> pthread_spinlock_t is only defined when `__ANDROID_API__` >= 24.
Thanks for reporting this @glandium ! I am in the process of disabling this for
android as we speak. Let me know if you see anything
@@ -27,6 +27,8 @@
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/Type.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
cjappl wrote:
FYI, these two headers require a cmake change:
```
diff --git a/clang/lib/Sema/CMakeL
@@ -27,6 +27,8 @@
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/Type.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
cjappl wrote:
To be less prescriptive with the solution:
I was getting linker errors saying that th
@@ -8057,3 +8057,70 @@ requirement:
}
}];
}
+
+def DocCatNonBlockingNonAllocating : DocumentationCategory<"Performance
Constraint Attributes"> {
+ let Content = [{
cjappl wrote:
It may be good to mention what the flag is that you use to enable these
war
cjappl wrote:
Hi @dougsonos,
Just starting to integrate our two changes and noticing a possible bug here.
Issue: `blocking(false)` does not seem to resolve to `nonblocking`
## Streps to repro:
1. Have an example like
```
int main() [[clang::blocking(false)]]
{
return 0;
}
```
2. (optional
cjappl wrote:
Ah! Nice, that is a totally valid solution as well. The only argument for the
parameter that I can think of is symmetry.
I just noticed it _could_ accept a parameter, so I expected the behavior above.
Absolutely good by me to strike it from being possible.
https://github.com/llv
cjappl wrote:
I can confirm that now if I try to use any argument with `blocking` I get:
```
/Users/topher/Desktop/test_radsan/main.cpp:25:40: error: 'blocking' attribute
takes no arguments
25 | float process (float* data) noexcept [[clang::blocking(false)]]
```
Great!
https://github.com/l
cjappl wrote:
Possibly another bug here (or user error).
I am trying to see the warnings show up for a simple test program. The clang
used in this example is the tip of your branch at time of writing
b95964c2570c11d1d80ae6874be5e400f7b504ad
```cpp
#include
#include
int* process () [[clang:
@@ -1870,6 +1870,28 @@ bool Sema::IsFunctionConversion(QualType FromType,
QualType ToType,
FromFn = QT->getAs();
Changed = true;
}
+
+// For C, when called from checkPointerTypesForAssignment,
+// we need not to alter FromFn, or else even an innocuous c
@@ -18347,7 +18347,7 @@ void Sema::SetFunctionBodyKind(Decl *D, SourceLocation
Loc, FnBodyKind BodyKind,
}
}
-bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New,
+bool Sema::CheckOverridingFunctionAttributes(CXXMethodDecl *New,
cjappl wro
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext &Ctx, ParsedAttr
&Attr) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
&Mode,
+ bool RequireC
https://github.com/cjappl commented:
Just doing a first pass review. The guts of this are above my paygrade, but
after playing with this functionally for a few days it seems to behave as
intended from the realtime sanitizer team! :)
https://github.com/llvm/llvm-project/pull/84983
_
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/84983
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,124 @@
+// RUN: %clang_cc1 %s -ast-dump -fblocks | FileCheck %s
+
+// Make sure that the attribute gets parsed and attached to the correct AST
elements.
+
+#pragma clang diagnostic ignored "-Wunused-variable"
+
+//
=
@@ -18347,7 +18347,7 @@ void Sema::SetFunctionBodyKind(Decl *D, SourceLocation
Loc, FnBodyKind BodyKind,
}
}
-bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New,
+bool Sema::CheckOverridingFunctionAttributes(CXXMethodDecl *New,
cjappl wro
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/91529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cjappl wrote:
Sorry, premature!!
https://github.com/llvm/llvm-project/pull/91529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/91529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/92460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain &TC, const
ArgList &Args,
StaticRuntimes.push_back("asan_cxx");
}
+ if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) {
+StaticRuntimes.push_back("radsan");
+ }
cjappl wrote:
1 - 100 of 235 matches
Mail list logo