PATCH: max_heap_for_compressed_oops() declared with size_t, but defined with uintx

Thomas Schatzl thomas.schatzl at oracle.com
Thu May 22 09:24:16 UTC 2014


Hi Dan,

On Thu, 2014-05-22 at 10:59 +0200, Dan Horák wrote:
> Hello,
> 
> I've created a patch [1] to fix usage of uintx where size_t type is
> expected in hotspot/src/share/vm/runtime/arguments.cpp
> 
> The Arguments::max_heap_for_compressed_oops() method is declared in
> arguments.hpp as
> 	size_t max_heap_for_compressed_oops()
> but later defined in arguments.cpp as
> 	uintx max_heap_for_compressed_oops()
> 
> For most platforms the uintx and size_t types are effectively the
> same, so the interchange is uncaught, but on s390 (32-bit) the size_t is
> "unsigned long" which makes it incompatible with "unsigned int".
> 
> This a follow-up of my earlier s390 related patch [2]
> 
> [1] http://fedora.danny.cz/openjdk/argument/webrev/
> [2]
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-September/010913.html
> 
> Note: I'm Red Hat employee (dhorak at redhat.com), so I should be covered
> by Red Hat's CLA for my contributions.

 created https://bugs.openjdk.java.net/browse/JDK-8043723 .

Reviewed. I can push the change.

Looks good,
Thomas



More information about the hotspot-dev mailing list