< prev index next >
src/share/vm/oops/generateOopMap.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 27,36 ****
--- 27,37 ----
#include "oops/generateOopMap.hpp"
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
+ #include "runtime/os.hpp"
#include "runtime/relocator.hpp"
#include "utilities/bitMap.inline.hpp"
#include "prims/methodHandles.hpp"
//
*** 2131,2144 ****
// The tons of extra code it would generate didn't seem worth the change.
//
void GenerateOopMap::error_work(const char *format, va_list ap) {
_got_error = true;
char msg_buffer[512];
! vsnprintf(msg_buffer, sizeof(msg_buffer), format, ap);
// Append method name
char msg_buffer2[512];
! jio_snprintf(msg_buffer2, sizeof(msg_buffer2), "%s in method %s", msg_buffer, method()->name()->as_C_string());
_exception = Exceptions::new_exception(Thread::current(),
vmSymbols::java_lang_LinkageError(), msg_buffer2);
}
void GenerateOopMap::report_error(const char *format, ...) {
--- 2132,2145 ----
// The tons of extra code it would generate didn't seem worth the change.
//
void GenerateOopMap::error_work(const char *format, va_list ap) {
_got_error = true;
char msg_buffer[512];
! os::vsnprintf(msg_buffer, sizeof(msg_buffer), format, ap);
// Append method name
char msg_buffer2[512];
! os::snprintf(msg_buffer2, sizeof(msg_buffer2), "%s in method %s", msg_buffer, method()->name()->as_C_string());
_exception = Exceptions::new_exception(Thread::current(),
vmSymbols::java_lang_LinkageError(), msg_buffer2);
}
void GenerateOopMap::report_error(const char *format, ...) {
*** 2152,2162 ****
// errors. Let the verifier give a better message.
const char *msg = "Illegal class file encountered. Try running with -Xverify:all";
_got_error = true;
// Append method name
char msg_buffer2[512];
! jio_snprintf(msg_buffer2, sizeof(msg_buffer2), "%s in method %s", msg,
method()->name()->as_C_string());
_exception = Exceptions::new_exception(Thread::current(),
vmSymbols::java_lang_LinkageError(), msg_buffer2);
}
--- 2153,2163 ----
// errors. Let the verifier give a better message.
const char *msg = "Illegal class file encountered. Try running with -Xverify:all";
_got_error = true;
// Append method name
char msg_buffer2[512];
! os::snprintf(msg_buffer2, sizeof(msg_buffer2), "%s in method %s", msg,
method()->name()->as_C_string());
_exception = Exceptions::new_exception(Thread::current(),
vmSymbols::java_lang_LinkageError(), msg_buffer2);
}
< prev index next >