Skip to content

Commit 4e6531a

Browse files
HertzDevilstraight-shoota
authored andcommitted
Fix: Always use %p for pointers in Crystal::System.print_error (#14221)
1 parent 97ca775 commit 4e6531a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/exception/call_stack/libunwind.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct Exception::CallStack
102102
end
103103

104104
private def self.print_frame(repeated_frame)
105-
Crystal::System.print_error "[%p] ", repeated_frame.ip.address
105+
Crystal::System.print_error "[%p] ", repeated_frame.ip
106106
print_frame_location(repeated_frame)
107107
Crystal::System.print_error " (%d times)", repeated_frame.count + 1 unless repeated_frame.count == 0
108108
Crystal::System.print_error "\n"

src/exception/call_stack/stackwalk.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ struct Exception::CallStack
150150
end
151151

152152
private def self.print_frame(repeated_frame)
153-
Crystal::System.print_error "[%p] ", repeated_frame.ip.address
153+
Crystal::System.print_error "[%p] ", repeated_frame.ip
154154
print_frame_location(repeated_frame)
155155
Crystal::System.print_error " (%d times)", repeated_frame.count + 1 unless repeated_frame.count == 0
156156
Crystal::System.print_error "\n"

0 commit comments

Comments
 (0)