[compiler-rt] [hwasan] Add missing printf parameter in __hwasan_handle_longjmp (PR #82559)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 16:43:39 PST 2024


https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/82559

The diagnostic message had four format specifiers but only three
parameters. This patch adds what I assume to be the missing
parameter.


>From 78c8a6102e3a8eca11455248ddad4b7d4e01b054 Mon Sep 17 00:00:00 2001
From: Thurston Dang <thurston at google.com>
Date: Thu, 22 Feb 2024 00:41:29 +0000
Subject: [PATCH] [hwasan] Add missing printf parameter in
 __hwasan_handle_longjmp

The diagnostic message had four format specifiers but only three
parameters. This patch adds what I assume to be the missing
parameter.
---
 compiler-rt/lib/hwasan/hwasan.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp
index 52780becbdb264..ccdc0b4bc21bd3 100644
--- a/compiler-rt/lib/hwasan/hwasan.cpp
+++ b/compiler-rt/lib/hwasan/hwasan.cpp
@@ -692,7 +692,7 @@ void __hwasan_handle_longjmp(const void *sp_dst) {
         "WARNING: HWASan is ignoring requested __hwasan_handle_longjmp: "
         "stack top: %p; target %p; distance: %p (%zd)\n"
         "False positive error reports may follow\n",
-        (void *)sp, (void *)dst, dst - sp);
+        (void *)sp, (void *)dst, dst - sp, dst - sp);
     return;
   }
   TagMemory(sp, dst - sp, 0);



More information about the llvm-commits mailing list