--- a/src/hotspot/share/utilities/exceptions.cpp Tue Feb 13 15:48:23 2018 +0100
+++ b/src/hotspot/share/utilities/exceptions.cpp Tue Feb 27 18:17:57 2018 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
#include "runtime/init.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
+#include "runtime/os.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/threadCritical.hpp"
#include "utilities/events.hpp"
@@ -239,8 +240,7 @@
va_list ap;
va_start(ap, format);
char msg[max_msg_size];
- vsnprintf(msg, max_msg_size, format, ap);
- msg[max_msg_size-1] = '\0';
+ os::vsnprintf(msg, max_msg_size, format, ap);
va_end(ap);
_throw_msg(thread, file, line, h_name, msg);
}