UL: File size limit on 32 bit Linux

David Holmes david.holmes at oracle.com
Fri May 6 03:18:47 UTC 2016


On 6/05/2016 12:26 AM, Yasumasa Suenaga wrote:
> Hi all,
>
> This email relates to [1].
>
> LogFileOutput for UL uses fopen(3) to open logfile.
> However, it might not handle > 2GB size file [2].
>
> Actually, JDK-7122222 added _FILE_OFFSET_BITS macro for GC log.
> I guess we need this macro for UL as below:

This seems quite reasonable, particularly if GC logging, which now uses  
UL, is also relying on this.

There is more a general issue that crosses the JDK and JVM about dealing  
with 64-bit filesystems on 32-bit systems, but this change seems okay as  
a standalone issue fix.

Thanks,
David

> -----------------
> diff -r 5e008c3065e0 make/lib/JvmOverrideFiles.gmk
> --- a/make/lib/JvmOverrideFiles.gmk     Thu May 05 03:53:25 2016 +0000
> +++ b/make/lib/JvmOverrideFiles.gmk     Thu May 05 23:10:05 2016 +0900
> @@ -35,6 +35,7 @@
>
>  ifeq ($(OPENJDK_TARGET_OS), linux)
>    BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
> +  BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
>
>    ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
>      BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH
> $(CXX_O_FLAG_NONE)
> -----------------
>
> I do not have 32 bit Linux. So I cannot test.
> If it is correct, I file it to JBS and send review request.
>
>
> Thanks,
>
> Yasumasa
>
>
> [1]
> http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-May/019311.html
>
> [2] http://man7.org/linux/man-pages/man2/open.2.html


More information about the hotspot-runtime-dev mailing list