[llvm-branch-commits] [NFC][msan] Extract `handleSelectLikeInst` (PR #94881)

2024-06-10 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/94881
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][msan] Prepare function to extract main logic (PR #94880)

2024-06-10 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/94880
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [nfc][tsan] Clang format includes (PR #96599)

2024-06-25 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/96599
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][hwasan] Use %p to print addresses (PR #98576)

2024-07-11 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/98576
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer_common] Use %p to print addresses (PR #98578)

2024-07-11 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/98578
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [tsan] Replace ALIGNED with alignas (PR #98959)

2024-07-15 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/98959
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][hwasan] Remove duplicated checks (PR #100678)

2024-07-25 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/100678
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][ubsan] Add mixed filter test case (PR #100679)

2024-07-25 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/100679
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [InstCombine][asan] Don't speculate loads before `select ptr` (PR #100773)

2024-07-26 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/100773
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [docs] Fix code-block formating (PR #100772)

2024-07-26 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/100772
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][asan] Report DynInitUnPoison (PR #101586)

2024-08-02 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/101586
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [ModuleUtils] Add updateGlobalCtors/updateGlobalDtors (PR #101757)

2024-08-02 Thread Thurston Dang via llvm-branch-commits


@@ -44,6 +45,14 @@ void appendToGlobalCtors(Module &M, Function *F, int 
Priority,
 void appendToGlobalDtors(Module &M, Function *F, int Priority,
  Constant *Data = nullptr);
 
+/// Apply 'Fn' to the list of global ctors of module M and replace contructor
+/// record with the one returned by `Fn`. If `nullptr` was returned, the
+/// corresponding constructor will be removed from the array. For details see
+/// https://llvm.org/docs/LangRef.html#the-llvm-global-ctors-global-variable
+using GlobalCtorUpdateFn = llvm::function_ref;
+void updateGlobalCtors(Module &M, const GlobalCtorUpdateFn &Fn);

thurstond wrote:

'updateGlobalCtors' is a very generic name - is there a name that could be 
descriptive? (e.g., it's somewhat similar to 'map' in Haskell/Python or 
std::transform.)

https://github.com/llvm/llvm-project/pull/101757
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [ModuleUtils] Add updateGlobalCtors/updateGlobalDtors (PR #101757)

2024-08-02 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/101757
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][asan] Track current dynamic init module (PR #101597)

2024-08-02 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/101597
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [asan] Reduce priority of "contiguous_container:" VPrintf (PR #104402)

2024-08-14 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104402
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Use `UNLIKELY` in VReport/VPrintf (PR #104403)

2024-08-14 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104403
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [asan] Remove debug tracing from `report_globals` (PR #104404)

2024-08-14 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104404
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [asan] Remove debug tracing from `report_globals` (PR #104404)

2024-08-14 Thread Thurston Dang via llvm-branch-commits


@@ -4,7 +4,7 @@
 // RUN: %clangxx_asan -g -O0 -DSHARED_LIB -DSIZE=1 %s -fPIC -shared -o 
%t-so-1.so
 // RUN: %clangxx_asan -g -O0 -DSHARED_LIB -DSIZE=2 %s -fPIC -shared -o 
%t-so-2.so
 // RUN: %clangxx_asan -g -O0 %s %libdl -Wl,--export-dynamic -o %t
-// RUN: %env_asan_opts=report_globals=2:detect_odr_violation=1 %run %t 2>&1 | 
FileCheck %s
+// RUN: %env_asan_opts=report_globals=1:detect_odr_violation=1:verbosity=4 
%run %t 2>&1 | FileCheck %s

thurstond wrote:

Is there a particular reason why this uses verbosity=4 instead of 3? (it's the 
same output since verbosity >= 3, but a bit perplexing since nothing is gated 
on verbosity >= 4)

https://github.com/llvm/llvm-project/pull/104404
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][asan] Better `___asan_gen_` names (PR #104728)

2024-08-19 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104728
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][asan] Create `ModuleName` lazily (PR #104729)

2024-08-19 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104729
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][asan] Don't `cd` after `split-file` (PR #104727)

2024-08-19 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104727
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] Reland "[asan] Catch `initialization-order-fiasco` in modules without…" (PR #104730)

2024-08-19 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/104730
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] release/18.x: [msan] Re-exec with no ASLR if memory layout is incompatible on Linux (#85142) (PR #86201)

2024-03-21 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/86201
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [tsan] Set `thr->is_inited` after SlotAttachAndLock (PR #86342)

2024-03-22 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/86342
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [tsan] Process SIGPROF as sync signal only if thread is alive (PR #86343)

2024-03-22 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/86343
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [HWASAN] Don't instrument loads from global if globals are not tagged (PR #86774)

2024-03-27 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/86774
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] release/18.x: [msan] Re-exec with no ASLR if memory layout is incompatible on Linux (#85142) (PR #86201)

2024-03-27 Thread Thurston Dang via llvm-branch-commits

thurstond wrote:

> Hi @thurstond (or anyone else). If you would like to add a note about this 
> fix in the release notes (completely optional). Please reply to this comment 
> with a one or two sentence description of the fix.

"MemorySanitizer on Linux can now run even when maximum-entropy address-space 
layout randomization is configured globally (as is becoming increasingly 
common); MSan can automatically re-exec ASLR-off for the process if needed, 
instead of aborting."

Thanks @tstellar!

https://github.com/llvm/llvm-project/pull/86201
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang][builtin] Implement __builtin_allow_runtime_check (PR #87568)

2024-04-29 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/87568
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [NFC][msan] Remove unused parameter from getOriginPtrForVAArgument (PR #72687)

2023-11-17 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/72687
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [compiler-rt] [msan][x86] Fix shadow if vararg overflow beyond kParamTLSSize (PR #72707)

2023-11-17 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/72707
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [test][sanitizer] Allow fork_threaded test on Msan, Tsan (PR #75260)

2023-12-12 Thread Thurston Dang via llvm-branch-commits


@@ -1,6 +1,6 @@
 // RUN: %clangxx -O0 %s -o %t && %env_tool_opts=die_after_fork=0 %run %t
 
-// UNSUPPORTED: *
+// UNSUPPORTED: asan, lsan, hwasan

thurstond wrote:

This would also enable the test for ubsan, which is not mentioned in the title

https://github.com/llvm/llvm-project/pull/75260
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [test][sanitizer] Allow fork_threaded test on Msan, Tsan (PR #75260)

2023-12-12 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/75260
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [test][sanitizer] Allow fork_threaded test on Msan, Tsan (PR #75260)

2023-12-12 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/75260
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang-tools-extra] [lld] [libcxx] [compiler-rt] [llvm] [test][hwasan] Implement sanitizer_specific for HWASAN (PR #75280)

2023-12-13 Thread Thurston Dang via llvm-branch-commits


@@ -31,6 +31,19 @@ static void make_mem_good(void *p, size_t s) {
 static void make_mem_bad(void *p, size_t s) {
   __asan_poison_memory_region(p, s);
 }
+#elif __has_feature(hwaddress_sanitizer)
+#  include 
+#  include 
+static void check_mem_is_good(void *p, size_t s) {
+  if (__hwasan_test_shadow(p, s) != -1)
+abort();
+}
+static void make_mem_good(void *p, size_t s) {
+  __hwasan_tag_memory(p, __hwasan_get_tag_from_pointer(p), s);
+}
+static void make_mem_bad(void *p, size_t s) {
+  __hwasan_tag_memory(p, ~__hwasan_get_tag_from_pointer(p), s);

thurstond wrote:

Is this guaranteed to make memory bad if it's a short granule?

Also, in the rare case where the tag was 255, bitwise NOT results in the 
confusing tag value of zero.

https://github.com/llvm/llvm-project/pull/75280
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang-tools-extra] [lld] [libcxx] [compiler-rt] [llvm] [lsan] Install `pthread_atfork` (PR #75281)

2023-12-13 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/75281
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [asan] Install `pthread_atfork` (PR #75290)

2023-12-13 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/75290
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [asan] Install `pthread_atfork` (PR #75290)

2023-12-13 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/75290
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [asan] Install `pthread_atfork` (PR #75290)

2023-12-13 Thread Thurston Dang via llvm-branch-commits


@@ -148,6 +148,30 @@ void PlatformTSDDtor(void *tsd) {
 }
 #endif
 
+void InstallAtForkHandler() {
+  auto before = []() {
+if (CAN_SANITIZE_LEAKS) {
+  __lsan::LockGlobal();
+}
+// `_lsan` functions defined regardless of `CAN_SANITIZE_LEAKS` and do the
+// job.

thurstond wrote:

Not sure what "and do the job" means.

https://github.com/llvm/llvm-project/pull/75290
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] [clang] [compiler-rt] [clang-tools-extra] [llvm] [libcxx] [test][hwasan] Implement sanitizer_specific for HWASAN (PR #75280)

2023-12-13 Thread Thurston Dang via llvm-branch-commits


@@ -31,6 +31,30 @@ static void make_mem_good(void *p, size_t s) {
 static void make_mem_bad(void *p, size_t s) {
   __asan_poison_memory_region(p, s);
 }
+#elif __has_feature(hwaddress_sanitizer)
+#  include 
+#  include 
+static void check_mem_is_good(void *p, size_t s) {
+  if (__hwasan_test_shadow(p, s) != -1)
+abort();
+}
+static void make_mem_good(void *p, size_t s) {
+  __hwasan_tag_memory(p, __hwasan_get_tag_from_pointer(p), s);
+}
+static void make_mem_bad(void *p, size_t s) {
+  uint8_t tag = ~__hwasan_get_tag_from_pointer(p);
+  if (!tag) {
+// Nothing wrong with tag zero, but non-zero tags help to detect never
+// tagged memory.
+tag = 1;
+  }
+  __hwasan_tag_memory(p, , s);
+  // With missaligned `p` or short granules we can't guaranlee tag mismatch.

thurstond wrote:

Nits: "misaligned", "guaranlee"

https://github.com/llvm/llvm-project/pull/75280
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] [libcxx] [llvm] [compiler-rt] [clang-tools-extra] [clang] [test][hwasan] Implement sanitizer_specific for HWASAN (PR #75280)

2023-12-13 Thread Thurston Dang via llvm-branch-commits


@@ -42,7 +42,18 @@ static void make_mem_good(void *p, size_t s) {
   __hwasan_tag_memory(p, __hwasan_get_tag_from_pointer(p), s);
 }
 static void make_mem_bad(void *p, size_t s) {
-  __hwasan_tag_memory(p, ~__hwasan_get_tag_from_pointer(p), s);
+  uint8_t tag = ~__hwasan_get_tag_from_pointer(p);
+  if (!tag) {
+// Nothing wrong with tag zero, but non-zero tags help to detect never
+// tagged memory.
+tag = 1;
+  }
+  __hwasan_tag_memory(p, , s);

thurstond wrote:

Is this missing the tag parameter?

https://github.com/llvm/llvm-project/pull/75280
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [clang] [hwasan] Respect strip_path_prefix printing locals (PR #76132)

2023-12-21 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/76132
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [NFC][tsan] `ptr != 0` to implicit check (PR #77144)

2024-01-05 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/77144
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [tsan] Fallback to top frame (PR #77145)

2024-01-05 Thread Thurston Dang via llvm-branch-commits

thurstond wrote:

> Probably it's not important, as it should not happen, but if all frames are 
> internal we should pick top, not the bottom frame.

If we encounter a case that "should not happen", wouldn't it be better to 
fail/assert?

https://github.com/llvm/llvm-project/pull/77145
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libc] [llvm] [libcxx] [libunwind] [clang] [compiler-rt] [tsan] Fallback to top frame (PR #77145)

2024-01-05 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/77145
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] Allow to override GetDTLSRange (PR #108348)

2024-09-12 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108348
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] Test for #108348 (PR #108349)

2024-09-12 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108349
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Switch to `gnu_get_libc_version` (PR #108724)

2024-09-15 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108724
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] Add CHECK that static TLS info is ready (PR #108684)

2024-09-15 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108684
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Remove `else if` from ThreadDescriptorSizeFallback (PR #108909)

2024-09-16 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108909
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Move ThreadDescriptorSize into GLIBC/FREEBSD block (PR #108913)

2024-09-16 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108913
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Move `InitTlsSize` into `InitializePlatformEarly` (PR #108921)

2024-09-18 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108921
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][sanitizer] Move InitTlsSize (PR #108922)

2024-09-18 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108922
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [sanitizer] Switch from lazy `ThreadDescriptorSize` (PR #108923)

2024-09-18 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/108923
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] release/19.x: Reapply "[sanitizer_common] AND signals in BlockSignals instead of deleting (#113443)" for non-Android Linux only (#115790) (PR #116670)

2024-11-18 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/116670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] release/19.x: Reapply "[sanitizer_common] AND signals in BlockSignals instead of deleting (#113443)" for non-Android Linux only (#115790) (PR #116670)

2024-11-20 Thread Thurston Dang via llvm-branch-commits

thurstond wrote:

> @thurstond (or anyone else). If you would like to add a note about this fix 
> in the release notes (completely optional). Please reply to this comment with 
> a one or two sentence description of the fix. When you are done, please add 
> the release:note label to this PR.

Fixes a regression whereby the sanitizers may incorrectly unblock signals that 
had been blocked by the user.

https://github.com/llvm/llvm-project/pull/116670
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [NFC][ModuleUtils] Test appendToGlobalCtors/appendToGlobalDtors (PR #101753)

2024-12-27 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/101753
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2024-12-27 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.

LGTM if no objections pop up on discourse in the next few days

https://github.com/llvm/llvm-project/pull/121115
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt] [ubsan] Runtime and driver support for local-bounds (PR #120515)

2024-12-27 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/120515
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][BoundsChecking] Add TrapBB local variable (PR #119983)

2024-12-15 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/119983
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [ubsan] Add runtime test for -fsanitize=local-bounds (PR #120038)

2024-12-15 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/120038
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [ubsan] Pass fsanitize-skip-hot-cutoff into -fsanitize=bounds (PR #122576)

2025-01-10 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/122576
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFCI][BoundsChecking] Apply nosanitize on local-bounds instrumentation (PR #122416)

2025-01-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/122416
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond commented:

Would it be useful to keep -fsanitize=...null and add local-bounds instead of 
replacing null with local-bounds? It would make the test more rigorous and also 
make the diff smaller.

https://github.com/llvm/llvm-project/pull/122415
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [nfc][BoundsChecking] Rename BoundsCheckingOptions into Options (PR #122359)

2025-01-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/122359
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/122415
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [nfc][ubsan] Add local-bounds test (PR #122415)

2025-01-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/122415
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [ubsan] Pass fsanitize-skip-hot-cutoff into -fsanitize=bounds (PR #122576)

2025-01-10 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/122576
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [NFC][CFI] Avoid failing CFI tests (PR #135981)

2025-04-16 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/135981
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [MSAN] handle assorted AVX permutations (PR #143462)

2025-06-13 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/143462
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-13 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-13 Thread Thurston Dang via llvm-branch-commits


@@ -4191,6 +4191,15 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
   // We apply the same permutation (argument index 1) to the shadows.
   void handleAVXVpermil2var(IntrinsicInst &I) {
 assert(I.arg_size() == 3);
+assert(isa(I.getArgOperand(0)->getType()));
+assert(isa(I.getArgOperand(1)->getType()));
+assert(isa(I.getArgOperand(2)->getType()));
+[[maybe_unused]] auto ArgVectorSize =
+cast(I.getArgOperand(0)->getType())->getNumElements();
+assert(cast(I.getArgOperand(1)->getType())
+   ->getNumElements() == ArgVectorSize);
+assert(cast(I.getArgOperand(2)->getType())
+   ->getNumElements() == ArgVectorSize);

thurstond wrote:

Some of the assertions are redundant (e.g., if operand 0 is a vector, and 
operand 0's type is the same as operand 2's type, then operand 2 must be a 
vector with the same number of elements as operand 0), but that's fine.

https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond requested changes to this pull request.

Please add assertions and more tests (comments inline).

https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-09 Thread Thurston Dang via llvm-branch-commits


@@ -5130,6 +5149,26 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
   handleAVXVpermilvar(I);
   break;
 }
+case Intrinsic::x86_avx512_vpermi2var_d_128:
+case Intrinsic::x86_avx512_vpermi2var_d_256:
+case Intrinsic::x86_avx512_vpermi2var_d_512:
+case Intrinsic::x86_avx512_vpermi2var_hi_128:
+case Intrinsic::x86_avx512_vpermi2var_hi_256:
+case Intrinsic::x86_avx512_vpermi2var_hi_512:
+case Intrinsic::x86_avx512_vpermi2var_pd_128:
+case Intrinsic::x86_avx512_vpermi2var_pd_256:
+case Intrinsic::x86_avx512_vpermi2var_pd_512:
+case Intrinsic::x86_avx512_vpermi2var_ps_128:
+case Intrinsic::x86_avx512_vpermi2var_ps_256:
+case Intrinsic::x86_avx512_vpermi2var_ps_512:
+case Intrinsic::x86_avx512_vpermi2var_q_128:
+case Intrinsic::x86_avx512_vpermi2var_q_256:
+case Intrinsic::x86_avx512_vpermi2var_q_512:
+case Intrinsic::x86_avx512_vpermi2var_qi_128:
+case Intrinsic::x86_avx512_vpermi2var_qi_256:
+case Intrinsic::x86_avx512_vpermi2var_qi_512:
+  handleAVXVpermil2var(I);

thurstond wrote:

Please precommit tests to cover all these instructions.
(AFAICS the tests only cover llvm.x86.avx512.vpermi2var.d.512, 
llvm.x86.avx512.vpermi2var.pd.512, llvm.x86.avx512.vpermi2var.ps.512, 
llvm.x86.avx512.vpermi2var.q.512.)


https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-09 Thread Thurston Dang via llvm-branch-commits


@@ -4175,6 +4175,25 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
 setShadow(&I, IRB.CreateBitCast(CI, getShadowTy(&I)));
 setOriginForNaryOp(I);
   }
+  // Instrument AVX permutation intrinsic.
+  // We apply the same permutation (argument index 1) to the shadows.
+  void handleAVXVpermil2var(IntrinsicInst &I) {
+IRBuilder<> IRB(&I);

thurstond wrote:

Please add some assertions that check whether the instruction is suitable for 
this handler:

- number of operands
- type and size of each operand
- relation of input and output operands

https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle assorted AVX permutations (PR #143462)

2025-06-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond requested changes to this pull request.

Please add assertions and more tests (comments inline).

https://github.com/llvm/llvm-project/pull/143462
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle assorted AVX permutations (PR #143462)

2025-06-09 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/143462
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle assorted AVX permutations (PR #143462)

2025-06-09 Thread Thurston Dang via llvm-branch-commits


@@ -4161,7 +4161,7 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
 
   // Instrument AVX permutation intrinsic.
   // We apply the same permutation (argument index 1) to the shadow.
-  void handleAVXVpermilvar(IntrinsicInst &I) {
+  void handleAVXPermutation(IntrinsicInst &I) {

thurstond wrote:

Since this function is being used for many more cases, please augment it with 
assertions that check whether the instruction is suitable for this handler:
- number of operands
- type and size of each operand
- relation of input and output operands

https://github.com/llvm/llvm-project/pull/143462
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [MSAN] handle assorted AVX permutations (PR #143462)

2025-06-09 Thread Thurston Dang via llvm-branch-commits


@@ -5139,14 +5139,30 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
   assert(Success);
   break;
 }
-
+case Intrinsic::x86_avx2_permd:
+case Intrinsic::x86_avx2_permps:
+case Intrinsic::x86_ssse3_pshuf_b_128:
+case Intrinsic::x86_avx2_pshuf_b:
+case Intrinsic::x86_avx512_pshuf_b_512:
+case Intrinsic::x86_avx512_permvar_df_256:
+case Intrinsic::x86_avx512_permvar_df_512:
+case Intrinsic::x86_avx512_permvar_di_256:
+case Intrinsic::x86_avx512_permvar_di_512:
+case Intrinsic::x86_avx512_permvar_hi_128:
+case Intrinsic::x86_avx512_permvar_hi_256:
+case Intrinsic::x86_avx512_permvar_hi_512:
+case Intrinsic::x86_avx512_permvar_qi_128:
+case Intrinsic::x86_avx512_permvar_qi_256:
+case Intrinsic::x86_avx512_permvar_qi_512:
+case Intrinsic::x86_avx512_permvar_sf_512:
+case Intrinsic::x86_avx512_permvar_si_512:

thurstond wrote:

Please precommit tests to cover all these instructions.
(AFAICS the tests only cover llvm.x86.avx2.permd, llvm.x86.avx2.permps, 
llvm.x86.avx2.pshuf.b, llvm.x86.avx512.permvar.df.512, 
llvm.x86.avx512.permvar.di.512, llvm.x86.avx512.permvar.sf.512, 
llvm.x86.avx512.permvar.si.512.)

https://github.com/llvm/llvm-project/pull/143462
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits


@@ -2668,6 +2668,16 @@ def fsanitize_skip_hot_cutoff_EQ
 
 } // end -f[no-]sanitize* flags
 
+def fallow_runtime_check_skip_hot_cutoff_EQ
+: Joined<["-"], "fallow-runtime-check-skip-hot-cutoff=">,
+  Group,
+  Visibility<[ClangOption, CC1Option]>,
+  HelpText<"Exclude __allow_runtime_check for the top hottest code "
+   "responsible for "
+   "the given fraction of PGO counters "
+   "(0.0 [default] = skip none; 1/.0 = skip all). "

thurstond wrote:

Typo: "1/.0"

https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond commented:

W

https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits


@@ -2668,6 +2668,16 @@ def fsanitize_skip_hot_cutoff_EQ
 
 } // end -f[no-]sanitize* flags
 
+def fallow_runtime_check_skip_hot_cutoff_EQ

thurstond wrote:

"fallow" is either unfortunate or brilliant naming, similar to fun safe math. 
(I'm looking forward to the "fallow_fields" flag.)

https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond edited 
https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [clang] Add flag fallow-runtime-check-skip-hot-cutoff (PR #145999)

2025-06-26 Thread Thurston Dang via llvm-branch-commits


@@ -2668,6 +2668,16 @@ def fsanitize_skip_hot_cutoff_EQ
 
 } // end -f[no-]sanitize* flags
 
+def fallow_runtime_check_skip_hot_cutoff_EQ
+: Joined<["-"], "fallow-runtime-check-skip-hot-cutoff=">,

thurstond wrote:

Would it be more user-friendly (and possibly less code duplication) to add 
"allow_runtime_check" as one of the options for the existing 
`-fsanitize-skip-hot-cutoff` (possibly renaming the flag since it would no 
longer be entirely sanitizers)? e.g., allow 
`-fsanitize-skip-hot-cutoff=undefined=0.99,allow_runtime_check=1.0`

https://github.com/llvm/llvm-project/pull/145999
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [LSan] skip leaks from dlerror (PR #142876)

2025-06-04 Thread Thurston Dang via llvm-branch-commits

thurstond wrote:

There's a flag:
```
LSAN_FLAG(bool, use_ld_allocations, true,
  "Root set: mark as reachable all allocations made from dynamic "
  "linker. This was the old way to handle dynamic TLS, and will "
  "be removed soon. Do not use this flag.")
```

Obviously we shouldn't use this flag, but I wonder if something like that would 
be better than specifically suppressing `*dlerror*` (are other `dl*` functions 
going to break at some point?).



https://github.com/llvm/llvm-project/pull/142876
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [LSan] skip leaks from dlerror (PR #142876)

2025-06-04 Thread Thurston Dang via llvm-branch-commits

https://github.com/thurstond approved this pull request.


https://github.com/llvm/llvm-project/pull/142876
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [LSan] skip leaks from dlerror (PR #142876)

2025-06-04 Thread Thurston Dang via llvm-branch-commits

thurstond wrote:

> Yeah, it would be better to fix the root cause. But until then, this 
> exclusion makes sense IMO. WDYT?

SGTM.

https://github.com/llvm/llvm-project/pull/142876
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [MSAN] handle AVX vpermi2var (PR #143463)

2025-06-12 Thread Thurston Dang via llvm-branch-commits


@@ -4187,6 +4187,29 @@ struct MemorySanitizerVisitor : public 
InstVisitor {
 setShadow(&I, IRB.CreateBitCast(CI, getShadowTy(&I)));
 setOriginForNaryOp(I);
   }
+  // Instrument AVX permutation intrinsic.
+  // We apply the same permutation (argument index 1) to the shadows.
+  void handleAVXVpermil2var(IntrinsicInst &I) {
+assert(I.arg_size() == 3);
+assert(I.getArgOperand(0)->getType() == I.getArgOperand(2)->getType());
+assert(I.getType() == I.getArgOperand(0)->getType());

thurstond wrote:

Please also check that I.getType() is a vector type, and that 
`I.getArgOperand(0)` has the same number of elements as `I.getArgOperand(1)`

https://github.com/llvm/llvm-project/pull/143463
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits