[前][次][番号順一覧][スレッド一覧]

ruby-changes:72669

From: Nobuyoshi <ko1@a...>
Date: Mon, 25 Jul 2022 09:19:07 +0900 (JST)
Subject: [ruby-changes:72669] b30b727c24 (master): Fix format specifier

https://git.ruby-lang.org/ruby.git/commit/?id=b30b727c24

From b30b727c243ad009a7f8435b559b466418874140 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 25 Jul 2022 00:01:30 +0900
Subject: Fix format specifier

`uintptr_t` is not always `unsigned long`, but can be casted to void
pointer safely.
---
 gc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gc.c b/gc.c
index 56e4480861..808b8e5399 100644
--- a/gc.c
+++ b/gc.c
@@ -5279,7 +5279,7 @@ read_barrier_handler(uintptr_t original_address) https://github.com/ruby/ruby/blob/trunk/gc.c#L5279
     /* If the page_body is NULL, then mprotect cannot handle it and will crash
      * with "Cannot allocate memory". */
     if (page_body == NULL) {
-        rb_bug("read_barrier_handler: segmentation fault at 0x%lx", original_address);
+        rb_bug("read_barrier_handler: segmentation fault at %p", (void *)original_address);
     }
 
     RB_VM_LOCK_ENTER();
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]