[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Mike Hommey via cfe-commits
glandium wrote: This also breaks building the compiler-rt for older android versions, because pthread_spinlock_t is only defined when __ANDROID_API__ >= 24. https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Chris Apple via 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `compiler-rt` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/2414

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `compiler-rt` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/974 Here is the relevant piece of

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I can reproduce and will debug in an hour. 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `compiler-rt` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/1332

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Vitaly Buka via cfe-commits
@@ -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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-09 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Chris Apple via cfe-commits
@@ -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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM. but I suggest to rework test into LIT, before or either commit. https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Vitaly Buka via cfe-commits
@@ -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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Vitaly Buka via cfe-commits
@@ -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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Vitaly Buka via cfe-commits
@@ -67,3 +67,7 @@ D: ThreadSanitizer N: Bill Wendling E: isanb...@gmail.com D: Profile runtime library + vitalybuka wrote: BTW @alexander-shaposhnikov NSAN is missing from here. https://github.com/llvm/llvm-project/pull/92460

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Chris Apple via cfe-commits
@@ -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 =

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > In the meantime, I commented out compilation of our unit tests that required > the -fsanitize flag, let me know if you'd prefer to see them removed until > later. These unit tests are paired with the code introduced here, so I think > at least by subject it makes sense to

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -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 =

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +//===--- rtsan_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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,207 @@ +//===--- rtsan_test.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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,412 @@ +//===--- rtsan_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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,97 @@ +//===--- rtsan_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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -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 =

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,50 @@ +//===--- rtsan_stack.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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Sorry for the delay. I have a really huge code review backlog... https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This is PR 1/?? (3? 4?) introducing the main guts of the realtime sanitizer. > For more information, please see the [discourse > thread](https://discourse.llvm.org/t/rfc-nolock-and-noalloc-attributes/76837). > We have also put together a [reviewer support >

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-01 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-26 Thread Chris Apple via cfe-commits
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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-21 Thread Chris Apple via 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:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-05 Thread Chris Apple via cfe-commits
@@ -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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-04 Thread Vitaly Buka via cfe-commits
@@ -1509,6 +1511,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList , AddLinkSanitizerLibArgs(Args, CmdArgs, "asan"); } vitalybuka wrote: Driver needs tests https://github.com/llvm/llvm-project/pull/92460

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: If you want another round, make sure to click `re-request review` 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-03 Thread Chris Apple via 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

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-03 Thread Chris Apple via 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