[compiler-rt] [NFC] [HWASan] clarify FIXME comment (PR #87689)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 12:48:32 PDT 2024


https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/87689

>From f8eeb741e19aa2294b2d6a4d4338856011cba6c5 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 4 Apr 2024 12:42:25 -0700
Subject: [PATCH 1/2] [NFC] [HWASan] clarify FIXME comment

---
 compiler-rt/lib/hwasan/hwasan_thread_list.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compiler-rt/lib/hwasan/hwasan_thread_list.h b/compiler-rt/lib/hwasan/hwasan_thread_list.h
index f36d27864fc207..5eeb771cdf8203 100644
--- a/compiler-rt/lib/hwasan/hwasan_thread_list.h
+++ b/compiler-rt/lib/hwasan/hwasan_thread_list.h
@@ -55,6 +55,9 @@ static uptr RingBufferSize() {
   uptr desired_bytes = flags()->stack_history_size * sizeof(uptr);
   // FIXME: increase the limit to 8 once this bug is fixed:
   // https://bugs.llvm.org/show_bug.cgi?id=39030
+  // Note that we *cannot* do that on Android, as the runtime will indefinitely
+  // have to support code that is compield with ashr, which only works with
+  // shifts up to 6.
   for (int shift = 0; shift < 7; ++shift) {
     uptr size = 4096 * (1ULL << shift);
     if (size >= desired_bytes)

>From 0092d523c98fb55107d5cecbb5f129d7b1c2d6f0 Mon Sep 17 00:00:00 2001
From: Florian Mayer <fmayer at google.com>
Date: Thu, 4 Apr 2024 12:48:25 -0700
Subject: [PATCH 2/2] typo

---
 compiler-rt/lib/hwasan/hwasan_thread_list.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/hwasan/hwasan_thread_list.h b/compiler-rt/lib/hwasan/hwasan_thread_list.h
index 5eeb771cdf8203..369a1c3d6f5fd7 100644
--- a/compiler-rt/lib/hwasan/hwasan_thread_list.h
+++ b/compiler-rt/lib/hwasan/hwasan_thread_list.h
@@ -56,7 +56,7 @@ static uptr RingBufferSize() {
   // FIXME: increase the limit to 8 once this bug is fixed:
   // https://bugs.llvm.org/show_bug.cgi?id=39030
   // Note that we *cannot* do that on Android, as the runtime will indefinitely
-  // have to support code that is compield with ashr, which only works with
+  // have to support code that is compiled with ashr, which only works with
   // shifts up to 6.
   for (int shift = 0; shift < 7; ++shift) {
     uptr size = 4096 * (1ULL << shift);



More information about the llvm-commits mailing list