@@ -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 (
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
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
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
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
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
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
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
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:
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
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
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
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:
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
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-
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
@@ -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
@@ -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
@@ -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
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
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
@@ -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
@@ -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) {
+
@@ -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) {
+
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
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
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
@@ -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::
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
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
@@ -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::
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
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
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
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
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
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
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
@@ -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::
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
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
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
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
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
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
@@ -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::
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
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
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
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
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
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
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
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
@@ -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
@@ -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.
+//
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
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
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
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:
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
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:
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
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:
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:
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
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
___
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
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.
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
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
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
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
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
@@ -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
___
@@ -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_
@@ -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_
@@ -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
@@ -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
@@ -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
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
@@ -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
___
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
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
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
@@ -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 (
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 - 100 of 294 matches
Mail list logo