UL: File size limit on 32 bit Linux

Yasumasa Suenaga yasuenag at gmail.com
Thu May 5 14:26:41 UTC 2016


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:

-----------------
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