--- old/src/share/vm/runtime/jniHandles.cpp 2017-07-18 19:33:56.361437107 -0400 +++ new/src/share/vm/runtime/jniHandles.cpp 2017-07-18 19:33:56.233430452 -0400 @@ -444,6 +444,15 @@ assert(current->_last == NULL, "only first block should have _last set"); assert(current->_free_list == NULL, "only first block should have _free_list set"); + if (current->_top == 0) { + // All blocks after the first clear trailing block are already cleared. +#ifdef ASSERT + for ( ; current != NULL; current = current->_next) { + assert(current->_top == 0, "trailing blocks must already be cleared"); + } +#endif + break; + } current->_top = 0; if (ZapJNIHandleArea) current->zap(); }