Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jniCheck.hpp @ 465:dc16daa0329d
6739363: Xcheck jni doesn't check native function arguments
Summary: Fix adds support for verifying arguments with -Xcheck:jni.
Reviewed-by: coleenp
author | poonam |
---|---|
date | Thu, 04 Dec 2008 17:29:56 -0800 |
parents | a61af66fc99e |
children | ad8c8ca4ab0f |
comparison
equal
deleted
inserted
replaced
414:348be627a148 | 465:dc16daa0329d |
---|---|
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * CA 95054 USA or visit www.sun.com if you need additional information or |
21 * have any questions. | 21 * have any questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 extern "C" { | |
26 // Report a JNI failure caught by -Xcheck:jni. Perform a core dump. | |
27 // Note: two variations -- one to be called when in VM state (e.g. when | |
28 // within IN_VM macro), one to be called when in NATIVE state. | |
29 | |
30 // When in VM state: | |
31 static void ReportJNIFatalError(JavaThread* thr, const char *msg) { | |
32 tty->print_cr("FATAL ERROR in native method: %s", msg); | |
33 thr->print_stack(); | |
34 os::abort(true); | |
35 } | |
36 } | |
37 | |
25 // | 38 // |
26 // Checked JNI routines that are useful for outside of checked JNI | 39 // Checked JNI routines that are useful for outside of checked JNI |
27 // | 40 // |
28 | 41 |
29 class jniCheck : public AllStatic { | 42 class jniCheck : public AllStatic { |