提交 719af94b 编写于 作者: D dsimms

8046662: Check JNI ReleaseStringChars / ReleaseStringUTFChars verify_guards test inverted

Summary: negative verify_guards when testing for corruption
Reviewed-by: sla, fparain
上级 3925cfff
......@@ -1425,7 +1425,7 @@ JNI_ENTRY_CHECKED(void,
}
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 @@ JNI_ENTRY_CHECKED(void,
}
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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册