8039743: Use correct format specifier to print size_t values and pointers in the GC code
jon.masamitsu at oracle.com
Wed Apr 9 22:42:42 UTC 2014
- gclog_or_tty->print(" (promotion failure size = " SIZE_FORMAT ") ",
+ gclog_or_tty->print(" (promotion failure size = %u) ",
size() returning an int, did you want %d instead of %u?
Rest looks good.
On 04/09/2014 06:36 AM, Stefan Karlsson wrote:
> Hi all,
> There are a number of occurrence in HotSpot that use %d and 0x%x to
> print size_t values and pointers. This is incorrect on platforms that
> have different type sizes for size_t and pointers compared to ints.
> This patch only touches the GC code, but is based on an larger patch
> from Mikael Vidstedt.
More information about the hotspot-gc-dev