src/share/vm/prims/jvm.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/prims/jvm.cpp Tue Apr 29 16:55:48 2014
--- new/src/share/vm/prims/jvm.cpp Tue Apr 29 16:55:48 2014
*** 2738,2783 ****
--- 2738,2791 ----
// Printing support //////////////////////////////////////////////////
extern "C" {
+ PRAGMA_DIAG_PUSH
+ PRAGMA_FORMAT_NONLITERAL_IGNORED
int jio_vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
// see bug 4399518, 4417214
if ((intptr_t)count <= 0) return -1;
return vsnprintf(str, count, fmt, args);
}
+ PRAGMA_DIAG_POP
+ ATTRIBUTE_PRINTF(3, 4)
int jio_snprintf(char *str, size_t count, const char *fmt, ...) {
va_list args;
int len;
va_start(args, fmt);
len = jio_vsnprintf(str, count, fmt, args);
va_end(args);
return len;
}
+ ATTRIBUTE_PRINTF(2, 3)
int jio_fprintf(FILE* f, const char *fmt, ...) {
int len;
va_list args;
va_start(args, fmt);
len = jio_vfprintf(f, fmt, args);
va_end(args);
return len;
}
+ PRAGMA_DIAG_PUSH
+ PRAGMA_FORMAT_NONLITERAL_IGNORED
int jio_vfprintf(FILE* f, const char *fmt, va_list args) {
if (Arguments::vfprintf_hook() != NULL) {
return Arguments::vfprintf_hook()(f, fmt, args);
} else {
return vfprintf(f, fmt, args);
}
}
+ PRAGMA_DIAG_POP
+ ATTRIBUTE_PRINTF(1, 2)
JNIEXPORT int jio_printf(const char *fmt, ...) {
int len;
va_list args;
va_start(args, fmt);
len = jio_vfprintf(defaultStream::output_stream(), fmt, args);
*** 2910,2920 ****
--- 2918,2928 ----
}
oop java_thread = JNIHandles::resolve_non_null(jthread);
JavaThread* receiver = java_lang_Thread::thread(java_thread);
Events::log_exception(JavaThread::current(),
"JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]",
! receiver, (address)java_thread, throwable);
! p2i(receiver), p2i((address)java_thread), p2i(throwable));
// First check if thread is alive
if (receiver != NULL) {
// Check if exception is getting thrown at self (use oop equality, since the
// target object might exit)
if (java_thread == thread->threadObj()) {
src/share/vm/prims/jvm.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File