src/share/vm/prims/jniCheck.cpp

changeset 7033
29a5c2fd2d2e
parent 7032
fa62fb12cdca
child 7535
7ae4e26cb1e0
child 7627
d68158e12cea
equal deleted inserted replaced
7032:fa62fb12cdca 7033:29a5c2fd2d2e
1423 // still do the unchecked call to allow dtrace probes 1423 // still do the unchecked call to allow dtrace probes
1424 UNCHECKED()->ReleaseStringChars(env,str,chars); 1424 UNCHECKED()->ReleaseStringChars(env,str,chars);
1425 } 1425 }
1426 else { 1426 else {
1427 GuardedMemory guarded((void*)chars); 1427 GuardedMemory guarded((void*)chars);
1428 if (guarded.verify_guards()) { 1428 if (!guarded.verify_guards()) {
1429 tty->print_cr("ReleaseStringChars: release chars failed bounds check. " 1429 tty->print_cr("ReleaseStringChars: release chars failed bounds check. "
1430 "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars)); 1430 "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars));
1431 guarded.print_on(tty); 1431 guarded.print_on(tty);
1432 NativeReportJNIFatalError(thr, "ReleaseStringChars: " 1432 NativeReportJNIFatalError(thr, "ReleaseStringChars: "
1433 "release chars failed bounds check."); 1433 "release chars failed bounds check.");
1506 // still do the unchecked call to allow dtrace probes 1506 // still do the unchecked call to allow dtrace probes
1507 UNCHECKED()->ReleaseStringUTFChars(env,str,chars); 1507 UNCHECKED()->ReleaseStringUTFChars(env,str,chars);
1508 } 1508 }
1509 else { 1509 else {
1510 GuardedMemory guarded((void*)chars); 1510 GuardedMemory guarded((void*)chars);
1511 if (guarded.verify_guards()) { 1511 if (!guarded.verify_guards()) {
1512 tty->print_cr("ReleaseStringUTFChars: release chars failed bounds check. " 1512 tty->print_cr("ReleaseStringUTFChars: release chars failed bounds check. "
1513 "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars)); 1513 "string: " PTR_FORMAT " chars: " PTR_FORMAT, p2i(str), p2i(chars));
1514 guarded.print_on(tty); 1514 guarded.print_on(tty);
1515 NativeReportJNIFatalError(thr, "ReleaseStringUTFChars: " 1515 NativeReportJNIFatalError(thr, "ReleaseStringUTFChars: "
1516 "release chars failed bounds check."); 1516 "release chars failed bounds check.");

mercurial