[aarch64-port-dev ] Stop spurious O_BUFLEN warnings

Edward Nevill ed at camswl.com
Tue May 13 14:16:07 UTC 2014


Hi,

The following patch stops spurious warning of the form

OpenJDK 64-Bit Server VM warning: increase O_BUFLEN in ostream.hpp -- output truncated

when invoke with -XX:+PrintFlagsFinal

These are generated by the following code in ostream.cpp

  } else if (vsnprintf(buffer, buflen, format, ap) >= 0) {
    result = buffer;
    result_len = strlen(result);
  } else {
    DEBUG_ONLY(warning("increase O_BUFLEN in ostream.hpp -- output truncated");)
    result = buffer;
    result_len = buflen - 1;
    buffer[result_len] = 0;
  }


So, if vsnprintf returns negative it prints this error. This happens because it is passed a bad format string from globals.cpp.

Regards,
Ed.

--- CUT HERE ---
# HG changeset patch
# User Edward Nevill edward.nevill at linaro.org
# Date 1399990511 -3600
#      Tue May 13 15:15:11 2014 +0100
# Node ID 0ca397cbac958ef0f2ec94405d8c6b72c2526902
# Parent  6523308f9626004171794372e5577a0f6939b4df
Stop spurious O_BUFLEN warnings

diff -r 6523308f9626 -r 0ca397cbac95 src/share/vm/runtime/globals.cpp
--- a/src/share/vm/runtime/globals.cpp	Mon May 12 13:41:43 2014 +0100
+++ b/src/share/vm/runtime/globals.cpp	Tue May 13 15:15:11 2014 +0100
@@ -295,7 +295,7 @@
     else st->print("%-16s", "");
   }
 
-  st->print("%-20");
+  st->print("%-20s", " ");
   print_kind(st);
 
   if (withComments) {
--- CUT HERE ---




More information about the aarch64-port-dev mailing list