109 static const char * fatal_wrong_field = "Wrong field ID passed to JNI"; |
109 static const char * fatal_wrong_field = "Wrong field ID passed to JNI"; |
110 static const char * fatal_instance_field_not_found = "Instance field not found in JNI get/set field operations"; |
110 static const char * fatal_instance_field_not_found = "Instance field not found in JNI get/set field operations"; |
111 static const char * fatal_instance_field_mismatch = "Field type (instance) mismatch in JNI get/set field operations"; |
111 static const char * fatal_instance_field_mismatch = "Field type (instance) mismatch in JNI get/set field operations"; |
112 static const char * fatal_non_string = "JNI string operation received a non-string"; |
112 static const char * fatal_non_string = "JNI string operation received a non-string"; |
113 |
113 |
114 |
|
115 |
|
116 // Report a JNI failure caught by -Xcheck:jni. Perform a core dump. |
|
117 // Note: two variations -- one to be called when in VM state (e.g. when |
|
118 // within IN_VM macro), one to be called when in NATIVE state. |
|
119 |
|
120 // When in VM state: |
|
121 static void ReportJNIFatalError(JavaThread* thr, const char *msg) { |
|
122 tty->print_cr("FATAL ERROR in native method: %s", msg); |
|
123 thr->print_stack(); |
|
124 os::abort(true); |
|
125 } |
|
126 |
114 |
127 // When in VM state: |
115 // When in VM state: |
128 static void ReportJNIWarning(JavaThread* thr, const char *msg) { |
116 static void ReportJNIWarning(JavaThread* thr, const char *msg) { |
129 tty->print_cr("WARNING in native method: %s", msg); |
117 tty->print_cr("WARNING in native method: %s", msg); |
130 thr->print_stack(); |
118 thr->print_stack(); |