RFR (XS) 8224170: Build failures after JDK-8207812 (Implement Dynamic CDS Archive)

Vladimir Kozlov vladimir.kozlov at oracle.com
Sat May 18 16:32:55 UTC 2019


Good.

Should we also fix next line?:

int diff = int(estimate) - int(used);

as

int diff = int(estimate - used);

Thanks,
Vladimir

On 5/18/19 3:44 AM, Aleksey Shipilev wrote:
> Bug:
>    https://bugs.openjdk.java.net/browse/JDK-8224170
> 
> Bad format specifier for size_t blows up on x86_32 (and I imagine on other 32-bit platforms).
> 
> Fix:
> 
> diff -r 13507abf416c -r b2273edd75aa src/hotspot/share/memory/dynamicArchive.cpp
> --- a/src/hotspot/share/memory/dynamicArchive.cpp       Sat May 18 15:42:21 2019 +0900
> +++ b/src/hotspot/share/memory/dynamicArchive.cpp       Sat May 18 12:43:09 2019 +0200
> @@ -511,7 +511,7 @@
>       size_t used = size_t(top - bottom) + _other_region_used_bytes;
>       int diff = int(estimate) - int(used);
> 
> -    log_info(cds)("%s estimate = %lu used = %lu; diff = %d bytes", which, estimate, used, diff);
> +    log_info(cds)("%s estimate = " SIZE_FORMAT " used = " SIZE_FORMAT "; diff = %d bytes", which,
> estimate, used, diff);
>       assert(diff >= 0, "Estimate is too small");
> 
>       _last_verified_top = top;
> 
> Testing: Linux x86_64, x86_32 builds; Linux x86_32 tier1
> 


More information about the hotspot-dev mailing list