< prev index next >

src/share/vm/runtime/deoptimization.cpp

Print this page
rev 4140 : 8162419: closed/com/oracle/jfr/runtime/TestVMInfoEvent.sh failing after JDK-8155968
Summary: Under error conditions, always return -1 and perform null termination regardless of the behavior of underlying vsnprintf() implementation.
Reviewed-by: dholmes, cjplummer

@@ -1782,12 +1782,10 @@
   } else {
     len = jio_snprintf(buf, buflen, "%s%s",
                        trap_reason_name(reason),
                        recomp_flag ? " recompiled" : "");
   }
-  if (len >= buflen)
-    buf[buflen-1] = '\0';
   return buf;
 }
 
 
 //--------------------------------statics--------------------------------------

@@ -1850,12 +1848,10 @@
                        reason, action);
   } else {
     len = jio_snprintf(buf, buflen, "reason='%s' action='%s' index='%d'",
                        reason, action, unloaded_class_index);
   }
-  if (len >= buflen)
-    buf[buflen-1] = '\0';
   return buf;
 }
 
 juint Deoptimization::_deoptimization_hist
         [Deoptimization::Reason_LIMIT]
< prev index next >