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
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.
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
---
@@ -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
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/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:
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://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,
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
---
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
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
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
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:
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
@@ -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:
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,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 =
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
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:
Bumped the branch to resolve the conflict in config-ix.cmake
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:
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:
@@ -1509,6 +1511,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList
,
AddLinkSanitizerLibArgs(Args, CmdArgs, "asan");
}
cjappl wrote:
Thanks for catching this! Added a few basic ones that test that the flag is
supported, and that some
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
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:
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:
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
cjappl wrote:
Weekly ping of reviewers
@yln @vitalybuka @Sirraide @AaronBallman @zygoloid @compnerd @petrhosek
@isanbard
Looking for weighing in on any of the code as it stands now, or the naming
question posed by MaskRay
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain , const
ArgList ,
StaticRuntimes.push_back("asan_cxx");
}
+ if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) {
+StaticRuntimes.push_back("radsan");
+ }
cjappl wrote:
Ok,
@@ -0,0 +1,106 @@
+//===--- radsan_context.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:
@@ -0,0 +1,106 @@
+//===--- radsan_context.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:
@@ -0,0 +1,106 @@
+//===--- radsan_context.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:
@@ -0,0 +1,71 @@
+# -*- Python -*-
+
+import os
+
+# Setup config name.
+config.name = "RADSAN" + config.name_suffix
+
+# Setup source root.
+config.test_source_root = os.path.dirname(__file__)
cjappl wrote:
Yes, the lit tests may be placed directly in
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 reopened
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 closed 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:
Pinging possibly interested parties for review.
@yln @vitalybuka @Sirraide @AaronBallman @dougsonos @davidtrevelyan
Please feel free to add more, we don't know who all may be interested. Thanks
in advance
https://github.com/llvm/llvm-project/pull/92460
@@ -32,6 +32,9 @@ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32}
${ARM64} ${RISCV64}
${LOONGARCH64})
set(ALL_ASAN_ABI_SUPPORTED_ARCH ${X86_64} ${ARM64} ${ARM64_32})
set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${LOONGARCH64})
@@ -1382,6 +1382,10 @@ collectSanitizerRuntimes(const ToolChain , const
ArgList ,
StaticRuntimes.push_back("asan_cxx");
}
+ if (!SanArgs.needsSharedRt() && SanArgs.needsRadsanRt()) {
+StaticRuntimes.push_back("radsan");
+ }
cjappl wrote:
One
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/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 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
@@ -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
@@ -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"
+
+//
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
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr
) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
,
+ bool RequireConstexpr) {
+
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
@@ -7963,6 +7967,148 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr
) {
llvm_unreachable("unexpected attribute kind!");
}
+ExprResult Sema::ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode
,
+ bool RequireConstexpr) {
+
@@ -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
@@ -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
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 ()
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!
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.
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.
@@ -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
@@ -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
@@ -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
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
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:
@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
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
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
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 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
66 matches
Mail list logo