RFR(xs): 8153845: UL log write method missing essential assert

Robbin Ehn robbin.ehn at oracle.com
Fri Apr 8 11:54:16 UTC 2016


Hi all,

Please review,

Bug: https://bugs.openjdk.java.net/browse/JDK-8153845

Tested with jprt.

diff -r 35cb720769c5 src/share/vm/logging/logTagSet.cpp
--- a/src/share/vm/logging/logTagSet.cpp	Fri Apr 08 08:51:45 2016 +0200
+++ b/src/share/vm/logging/logTagSet.cpp	Fri Apr 08 13:39:12 2016 +0200
@@ -98,6 +98,7 @@
  const size_t vwrite_buffer_size = 512;

  void LogTagSet::vwrite(LogLevelType level, const char* fmt, va_list 
args) {
+  assert(level >= LogLevel::Off && level < LogLevel::Count, "Log level 
is incorrect");
    char buf[vwrite_buffer_size];
    va_list saved_args;           // For re-format on buf overflow.
    va_copy(saved_args, args);



Thanks!

/Robbin


More information about the serviceability-dev mailing list