mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8219583: Windows build failure after JDK-8214777 (Avoid some GCC 8.X strncpy() errors in HotSpot)
Reviewed-by: kbarrett, mikael
This commit is contained in:
parent
1f65a934c0
commit
3d6795e0e3
5 changed files with 9 additions and 8 deletions
|
@ -60,6 +60,7 @@
|
|||
#include "runtime/arguments.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/reflection.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
|
@ -5747,8 +5748,8 @@ void ClassFileParser::prepend_host_package_name(const InstanceKlass* unsafe_anon
|
|||
int class_name_len = _class_name->utf8_length();
|
||||
int symbol_len = host_pkg_len + 1 + class_name_len;
|
||||
char* new_anon_name = NEW_RESOURCE_ARRAY(char, symbol_len + 1);
|
||||
int n = snprintf(new_anon_name, symbol_len + 1, "%s/%.*s",
|
||||
host_pkg_name, class_name_len, _class_name->base());
|
||||
int n = os::snprintf(new_anon_name, symbol_len + 1, "%s/%.*s",
|
||||
host_pkg_name, class_name_len, _class_name->base());
|
||||
assert(n == symbol_len, "Unexpected number of characters in string");
|
||||
|
||||
// Decrement old _class_name to avoid leaking.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue