8153845: UL log write method missing essential assert
authorrehn
Mon, 11 Apr 2016 09:45:03 +0200
changeset 37464 5373bbadb433
parent 37463 a4581cbe32cd
child 37465 1d5551f466ee
8153845: UL log write method missing essential assert Reviewed-by: mlarsson, brutisso
hotspot/src/share/vm/logging/logTagSet.cpp
--- a/hotspot/src/share/vm/logging/logTagSet.cpp	Fri Apr 08 15:36:34 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTagSet.cpp	Mon Apr 11 09:45:03 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::First && level <= LogLevel::Last, "Log level:%d is incorrect", level);
   char buf[vwrite_buffer_size];
   va_list saved_args;           // For re-format on buf overflow.
   va_copy(saved_args, args);