Mercurial > hg > graal-compiler
diff src/share/vm/prims/jniCheck.cpp @ 20319:29a5c2fd2d2e
8046662: Check JNI ReleaseStringChars / ReleaseStringUTFChars verify_guards test inverted
Summary: negative verify_guards when testing for corruption
Reviewed-by: sla, fparain
author | dsimms |
---|---|
date | Thu, 14 Aug 2014 15:22:13 +0200 |
parents | fa62fb12cdca |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/share/vm/prims/jniCheck.cpp Thu Aug 14 15:16:07 2014 +0200 +++ b/src/share/vm/prims/jniCheck.cpp Thu Aug 14 15:22:13 2014 +0200 @@ -1425,7 +1425,7 @@ } else { GuardedMemory guarded((void*)chars); - if (guarded.verify_guards()) { + if (!guarded.verify_guards()) { tty->print_cr("ReleaseStringChars: release chars failed bounds check. " "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars)); guarded.print_on(tty); @@ -1508,7 +1508,7 @@ } else { GuardedMemory guarded((void*)chars); - if (guarded.verify_guards()) { + if (!guarded.verify_guards()) { tty->print_cr("ReleaseStringUTFChars: release chars failed bounds check. " "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars)); guarded.print_on(tty);