RFR(XS): 8060721: Test runtime/SharedArchiveFile/LimitSharedSizes.java fails in jdk 9 fcs new platforms/compiler

David Holmes david.holmes at oracle.com
Thu Nov 6 00:50:27 UTC 2014


On 6/11/2014 5:14 AM, Calvin Cheung wrote:
> While upgrading the compiler on Mac for jdk9, we found this compiler bug
> where it skips the following 2 lines of code in metaspaceShared.cpp when
> optimization is enable (set to -Os) for the fastdebug and product builds.
>      strcat(class_list_path_str, os::file_separator());
>      strcat(class_list_path_str, "classlist");
>
> The bug is reproducible with Xcode 5.1.1 and 6.1.
>
> A workaround fix is to rewrite an "if" block in the
> MetaspaceShared::preload_and_dump() method.

Can't you simply replace the strcats with jio_snprintf and do away with 
the sub_path array?

Or even try strncat instead of strcat?

David

> JBS: https://bugs.openjdk.java.net/browse/JDK-8060721
>
> webrev: http://cr.openjdk.java.net/~ccheung/8060721/webrev/
>
> Testing:
>      JPRT
>      The affected testcase with product, fastdebug, and debug builds
> built with Xcode 5.1.1 and 6.1.
>
> thanks,
> Calvin


More information about the hotspot-runtime-dev mailing list