src/share/vm/oops/generateOopMap.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/oops/generateOopMap.cpp Tue Apr 29 16:55:05 2014
--- new/src/share/vm/oops/generateOopMap.cpp Tue Apr 29 16:55:05 2014
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 1997, 2014, 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.
*** 2128,2154 ****
--- 2128,2159 ----
// _got_error flag controls execution. NOT TODO: The VM exception propagation
// mechanism using TRAPS/CHECKs could be used here instead but it would need
// to be added as a parameter to every function and checked for every call.
// The tons of extra code it would generate didn't seem worth the change.
//
+ PRAGMA_DIAG_PUSH
+ PRAGMA_FORMAT_NONLITERAL_IGNORED
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);
}
+ PRAGMA_DIAG_POP
+ ATTRIBUTE_PRINTF(2,3)
void GenerateOopMap::report_error(const char *format, ...) {
va_list ap;
va_start(ap, format);
error_work(format, ap);
}
+ ATTRIBUTE_PRINTF(2,3)
void GenerateOopMap::verify_error(const char *format, ...) {
// We do not distinguish between different types of errors for verification
// errors. Let the verifier give a better message.
const char *msg = "Illegal class file encountered. Try running with -Xverify:all";
_got_error = true;
src/share/vm/oops/generateOopMap.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File