[llvm] [lldb] [compiler-rt] [libcxx] [clang] [mlir] [lld] [clang-tools-extra] [hwasan] Add `__hwasan_get_tag_from_pointer` (PR #75267)

2023-12-13 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clangxx_hwasan -O0 %s -o %t && %run %t + +#include +#include +#include +#include +#include + +int main() { + auto p = std::make_unique(); + std::set ptrs; + for (unsigned i = 0;; ++i) { +void *ptr = __hwasan_tag_pointer(p.get(), i); +if (

[libcxx] [lldb] [mlir] [clang] [compiler-rt] [lld] [llvm] [clang-tools-extra] [hwasan] Add `__hwasan_get_tag_from_pointer` (PR #75267)

2023-12-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/75267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [llvm] [clang-tools-extra] [lldb] [mlir] [clang] [libcxx] [compiler-rt] [hwasan] Add `__hwasan_get_tag_from_pointer` (PR #75267)

2023-12-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/75267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang-tools-extra] [flang] [clang] [libcxx] [mlir] [llvm] [compiler-rt] [AsmWriter] Ensure getMnemonic doesn't return invalid pointers (PR #75783)

2023-12-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/75783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [hwasan] Separate sections in report (PR #76130)

2023-12-21 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/76130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver, sanitizer] Remove RequiresPIE and msan's RequiresPIE setting (PR #77689)

2024-01-10 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/77689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-03-21 Thread Thurston Dang via cfe-commits
thurstond wrote: > > I believe this patch is causing some issues on two PPC bots. Would you be > > able to help take a look? > > https://lab.llvm.org/buildbot/#/builders/57/builds/33601/steps/5/logs/stdio > > https://lab.llvm.org/buildbot/#/builders/36/builds/43759/steps/12/logs/stdio > > I g

[llvm] [clang] [clang-tools-extra] [compiler-rt] Re-exec TSan with no ASLR if memory layout is incompatible on Linux (PR #78351)

2024-01-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/78351 >From 74d320657671ee64650d96cbc33fef7d414c0ec1 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 16 Jan 2024 21:06:01 + Subject: [PATCH 1/6] Re-exec TSan with no ASLR if memory layout is incompatible

[clang] fc06cce - Revert "Respect integer overflow handling in abs builtin"

2023-08-18 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2023-08-18T19:59:34Z New Revision: fc06cce30d2b7d49778b9a27420ca239e0c49856 URL: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856 DIFF: https://github.com/llvm/llvm-project/commit/fc06cce30d2b7d49778b9a27420ca239e0c49856.diff LOG:

[clang] [Interp] Mark the test unsupported with Asan (PR #102859)

2024-08-12 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/102859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e398da2 - Revert "[Clang] Overflow Pattern Exclusions (#100272)"

2024-08-15 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-08-15T10:18:52-07:00 New Revision: e398da2b37fcc2696e1f5c661e5372844f4e1550 URL: https://github.com/llvm/llvm-project/commit/e398da2b37fcc2696e1f5c661e5372844f4e1550 DIFF: https://github.com/llvm/llvm-project/commit/e398da2b37fcc2696e1f5c661e5372844f4e1550.diff

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

2024-08-15 Thread Thurston Dang via cfe-commits
thurstond wrote: One of the tests is failing: ``` compiler-rt/test/ubsan/TestCases/Integer/bit-int-pass.c:31:15: error: CHECK-NOT: excluded string found in input // CHECK-NOT: runtime error: ^ :1:110: note: found here compiler-rt/test/ubsan/TestCases/Integer/bit-int-pass.c:11:10: r

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

2024-08-15 Thread Thurston Dang via cfe-commits
thurstond wrote: > > One of the tests is failing: > > ``` > > $ LIT_FILTER=bit-int-pass ninja check-ubsan > > > > compiler-rt/test/ubsan/TestCases/Integer/bit-int-pass.c:31:15: error: > > CHECK-NOT: excluded string found in input > > // CHECK-NOT: runtime error: > > ^ > > :1:110:

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

2024-08-15 Thread Thurston Dang via cfe-commits
thurstond wrote: > Added #104494 to address failures with non-x86 targets as those platforms > might produce failures. Thank you! https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang][Interp] Call move function for certain primitive types (PR #104437)

2024-08-15 Thread Thurston Dang via cfe-commits
thurstond wrote: This might have broken a buildbot: https://lab.llvm.org/buildbot/#/builders/52/builds/1578/steps/10/logs/stdio ``` RUN: at line 8: cat /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Interpreter/inline-virtual.cpp | /home/b/sanitizer-x86_64-linux-

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/101105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [docs][msan] List common cases reported by msan (PR #101105)

2024-07-29 Thread Thurston Dang via cfe-commits
@@ -8,11 +8,18 @@ MemorySanitizer Introduction -MemorySanitizer is a detector of uninitialized reads. It consists of a +MemorySanitizer is a detector of uninitialized memory use. It consists of a compiler instrumentation module and a run-time library. Typical

[clang] [llvm] [msan] Precommit MSan Arm NEON vst tests (PR #98247)

2024-07-16 Thread Thurston Dang via cfe-commits
thurstond wrote: Updated to IR tests https://github.com/llvm/llvm-project/pull/98247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Precommit MSan Arm NEON vst tests (PR #98247)

2024-07-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/98247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond converted_to_draft https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
@@ -2483,13 +2484,21 @@ struct MemorySanitizerVisitor : public InstVisitor { using OriginCombiner = Combiner; /// Propagate origin for arbitrary operation. - void setOriginForNaryOp(Instruction &I) { + /// + /// Optionally skips n trailing operands. + void setOriginFo

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,125 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3865,6 +3866,42 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + /// Handle Arm NEON vector store intrinsics (vst{2,3,4}). + /// + /// Arm NEON vector store intrinsics have the output address (pointer) as the + /// last argument

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -3742,6 +3751,124 @@ struct MemorySanitizerVisitor : public InstVisitor { setOriginForNaryOp(I); } + // Given two shadows ..., ..., return the interleaved value + // ABABABAB ... + // + // Width == number of elements in A == number of elements in B + Val

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-18 Thread Thurston Dang via cfe-commits
@@ -2498,6 +2499,15 @@ struct MemorySanitizerVisitor : public InstVisitor { MSV->setOrigin(I, Origin); } } + +/// Store the current combined value at the specified origin +/// location. +void DoneAndStoreOrigin(TypeSize TS, Value *OriginPtr) { +

[clang] [llvm] [msan] Implement support for Arm NEON vst{2,3,4} instructions (PR #99360)

2024-07-19 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/99360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Suppression by type for `-fsanitize=enum` (PR #114754)

2024-11-04 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/114754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/9] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/10] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond converted_to_draft https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/12] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From cffa7c3081a1d7b9cb64ac129109cb358d11a751 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/14] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] Reapply "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (#117804) (PR #117805)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/117805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From e635c76812eb8a6346e8602ec2eb6e4c389fcf6c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/15] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From e635c76812eb8a6346e8602ec2eb6e4c389fcf6c Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/16] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/7] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); -llvm::CallInst *TrapCall = Builder.CreateCall( -CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), -llvm::

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/13] [ubsan] Change ubsan-unique-traps to use nomerge instea

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

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/117649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (PR #117804)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/117804 Reverts llvm/llvm-project#117649 Reason: buildbot breakage: https://lab.llvm.org/buildbot/#/builders/144/builds/12581 >From 638427b08f7308f388b7f0bdaf426ca1f58e1b18 Mon Sep 17 00:00:00 2001 From: Thurston D

[clang] Revert "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (PR #117804)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/117804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From cffa7c3081a1d7b9cb64ac129109cb358d11a751 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 01/13] [ubsan] Change ubsan-unique-traps to use nomerge instea

[clang] Reapply "[NFC][clang] Add ubsan-trap-merge.c test to show absence of nomerge" (#117804) (PR #117805)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/117805 This reverts commit c8bdb31ff66e8934060c60816c57925fdec42a2c. It was reverted because I forgot to update the auto-generated assertions after adding the target triple. Original commit message: This test (cop

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

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117649 >From d85a7637f4386bc243f6f4198faf6f9cdbb49506 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:19:47 + Subject: [PATCH 1/2] [NFC][clang] Add ubsan-trap-merge.c test to show absence

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/6] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,185 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 thurstond wrote: Thanks, moved! https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits m

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
@@ -0,0 +1,106 @@ +// NOTE: Assertions have mostly been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// The most important assertion is the attributes at the end of the file, which +// shows that ubsan attaches 'nomerge' to each ubsantrap intrinsic. +//

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/8] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-26 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4a63f4d - Revert "[HLSL] set alwaysinline on HLSL functions (#106588)"

2024-09-17 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-09-17T21:06:36Z New Revision: 4a63f4d301c0e044073e1b1f8f110015ec1778a1 URL: https://github.com/llvm/llvm-project/commit/4a63f4d301c0e044073e1b1f8f110015ec1778a1 DIFF: https://github.com/llvm/llvm-project/commit/4a63f4d301c0e044073e1b1f8f110015ec1778a1.diff LOG:

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-17 Thread Thurston Dang via cfe-commits
thurstond wrote: @nico Sorry, my bad. I didn't notice the test was also updated as a companion to this change (https://github.com/llvm/llvm-project/pull/109023). I'll revert the test as well. https://github.com/llvm/llvm-project/pull/106588 ___ cfe-c

[clang] da03d17 - Revert "[HLSL] update StructuredBuffer subscript test for alwaysinline (#109023)"

2024-09-17 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-09-17T22:49:59Z New Revision: da03d17698f205fe8ebc54c32994c8ce2c51a81e URL: https://github.com/llvm/llvm-project/commit/da03d17698f205fe8ebc54c32994c8ce2c51a81e DIFF: https://github.com/llvm/llvm-project/commit/da03d17698f205fe8ebc54c32994c8ce2c51a81e.diff LOG:

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-17 Thread Thurston Dang via cfe-commits
thurstond wrote: Oh, actually, I just realized the test update was the fix-forward. So the correct fix would be to reland both the change and the test update. Sorry! https://github.com/llvm/llvm-project/pull/106588 ___ cfe-commits mailing list cfe-com

[clang] 4a0bf83 - Reapply "[HLSL] update StructuredBuffer subscript test for alwaysinline (#109023)"

2024-09-17 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-09-17T22:54:04Z New Revision: 4a0bf8377e1038d6cf9454c7c6740bd759729938 URL: https://github.com/llvm/llvm-project/commit/4a0bf8377e1038d6cf9454c7c6740bd759729938 DIFF: https://github.com/llvm/llvm-project/commit/4a0bf8377e1038d6cf9454c7c6740bd759729938.diff LOG:

[clang] b89bb77 - Reapply "[HLSL] set alwaysinline on HLSL functions (#106588)"

2024-09-17 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-09-17T22:54:52Z New Revision: b89bb7775d155fc787ab3170f3fa38449069ecb3 URL: https://github.com/llvm/llvm-project/commit/b89bb7775d155fc787ab3170f3fa38449069ecb3 DIFF: https://github.com/llvm/llvm-project/commit/b89bb7775d155fc787ab3170f3fa38449069ecb3.diff LOG:

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-17 Thread Thurston Dang via cfe-commits
thurstond wrote: I've reverted both of my reverts https://github.com/llvm/llvm-project/pull/106588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-17 Thread Thurston Dang via cfe-commits
thurstond wrote: > Sorry I didn't mention here that the fix was in. It looks like everything is > clean now? Yes, both your changes are back in and I anticipate the buildbots will be green again. Sorry for the noise! https://github.com/llvm/llvm-project/pull/106588 ___

[clang] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/117651 https://github.com/llvm/llvm-project/pull/65972 (continuation of https://reviews.llvm.org/D148654) had considered adding nomerge to ubsantrap, but did not proceed with that because of https://github.com/llvm

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

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/117649 This test (copied from https://github.com/llvm/llvm-project/pull/83470) demonstrates that UBSan does not add the nomerge annotation. This is significant because it results in them being merged by the backend.

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/3] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/117651 >From f24a87de48c42f310ee73ecf480ea2dcf631881f Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Tue, 26 Nov 2024 00:33:09 + Subject: [PATCH 1/2] [ubsan] Change ubsan-unique-traps to use nomerge instead

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Change ubsan-unique-traps to use nomerge instead of counter (PR #117651)

2024-11-25 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/117651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/121619 >From ca1fabc5ea75af0acdd1969c0ad505e04103e1c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Sat, 4 Jan 2025 02:53:00 + Subject: [PATCH 1/9] [sanitizer] Parse weighted sanitizer args and -fno-sanitiz

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +typedef double SanitizerMaskWeights[SanitizerKind::SO_Count]; thurstond wrote: Done https://github.com/llvm/llvm-project/pull/121619 ___

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -2649,6 +2649,11 @@ def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-unde HelpText<"Strip (or keep only, if negative) a given number of path components " "when emitting check metadata.">, MarshallingInfoInt, "0", "int">; +def fno_

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -2649,6 +2649,11 @@ def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-unde HelpText<"Strip (or keep only, if negative) a given number of path components " "when emitting check metadata.">, MarshallingInfoInt, "0", "int">; +def fno_

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -26,6 +26,8 @@ class SanitizerArgs { SanitizerSet RecoverableSanitizers; SanitizerSet TrapSanitizers; SanitizerSet MergeHandlers; + SanitizerSet TopHot; + SanitizerMaskWeights TopHotWeights = {0}; thurstond wrote: Renamed to Cutoff - is that ok inst

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -3602,6 +3602,7 @@ void CodeGenFunction::EmitCheck( llvm::Value *RecoverableCond = nullptr; llvm::Value *TrapCond = nullptr; bool NoMerge = false; + bool SanitizeGuardChecks = ClSanitizeGuardChecks; thurstond wrote: Noted for the next patch (this pat

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -3615,9 +3616,12 @@ void CodeGenFunction::EmitCheck( thurstond wrote: Done https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond ready_for_review https://github.com/llvm/llvm-project/pull/121619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +typedef double SanitizerMaskWeights[SanitizerKind::SO_Count]; thurstond wrote: Done https://github.com/llvm/llvm-project/pull/121619 ___

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/121619 >From ca1fabc5ea75af0acdd1969c0ad505e04103e1c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Sat, 4 Jan 2025 02:53:00 + Subject: [PATCH 1/5] [sanitizer] Parse weighted sanitizer args and -fno-sanitiz

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/121619 >From ca1fabc5ea75af0acdd1969c0ad505e04103e1c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Sat, 4 Jan 2025 02:53:00 + Subject: [PATCH 1/3] [sanitizer] Parse weighted sanitizer args and -fno-sanitiz

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/121619 >From ca1fabc5ea75af0acdd1969c0ad505e04103e1c9 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Sat, 4 Jan 2025 02:53:00 + Subject: [PATCH 1/4] [sanitizer] Parse weighted sanitizer args and -fno-sanitiz

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-06 Thread Thurston Dang via cfe-commits
@@ -3615,9 +3616,12 @@ void CodeGenFunction::EmitCheck( if (!CGM.getCodeGenOpts().SanitizeMergeHandlers.has(Checked[i].second)) NoMerge = true; + +if (!CGM.getCodeGenOpts().NoSanitizeTopHot.has(Checked[i].second)) + SanitizeGuardChecks = true; } - if (

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Thurston Dang via cfe-commits
@@ -46,26 +47,20 @@ bool clang::parseSanitizerWeightedValue(StringRef Value, bool AllowGroups, #include "clang/Basic/Sanitizers.def" .Default(SanitizerMask()); - if (ParsedKind) { -size_t equalsIndex = Value.find_first_of('='); -if (e

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Thurston Dang via cfe-commits
@@ -186,10 +188,24 @@ struct SanitizerSet { /// Returns a non-zero SanitizerMask, or \c 0 if \p Value is not known. SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups); +/// Parse a single weighted value (e.g., 'undefined=0.05') from a -fsanitize= or +/// -fn

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Thurston Dang via cfe-commits
@@ -1436,6 +1436,19 @@ static SmallVector serializeSanitizerKinds(SanitizerSet S) { return Values; } +static void parseSanitizerWeightedKinds( +StringRef FlagName, const std::vector &Sanitizers, +DiagnosticsEngine &Diags, SanitizerSet &S, SanitizerMaskCutoffs *Cutof

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Thurston Dang via cfe-commits
@@ -154,6 +154,8 @@ struct SanitizerKind { #include "clang/Basic/Sanitizers.def" }; // SanitizerKind +using SanitizerMaskCutoffs = std::array; thurstond wrote: Like this? https://github.com/llvm/llvm-project/pull/121619/commits/56ba349e7f085fca3bfd531ea219b1

[clang] [sanitizer] Parse weighted sanitizer args and -fno-sanitize-top-hot (PR #121619)

2025-01-07 Thread Thurston Dang via cfe-commits
@@ -1154,3 +1154,58 @@ // RUN: not %clang --target=x86_64-linux-gnu -fsanitize=realtime,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-REALTIME-UBSAN // CHECK-REALTIME-UBSAN: error: invalid argument '-fsanitize=realtime' not allowed with '-fsanitize=undefined' +

  1   2   3   >