--- old/src/hotspot/os/linux/os_linux.cpp Wed Nov 8 08:12:22 2017 +++ new/src/hotspot/os/linux/os_linux.cpp Wed Nov 8 08:12:21 2017 @@ -1835,9 +1835,7 @@ // may have been queued at the same time. if (!_stack_is_executable) { - ThreadsListHandle tlh; - JavaThreadIterator jti(tlh.list()); - for (JavaThread *jt = jti.first(); jt != NULL; jt = jti.next()) { + for (JavaThreadIteratorWithHandle jtiwh; JavaThread *jt = jtiwh.next(); ) { if (!jt->stack_guard_zone_unused() && // Stack not yet fully initialized jt->stack_guards_enabled()) { // No pending stack overflow exceptions if (!os::guard_memory((char *)jt->stack_end(), jt->stack_guard_zone_size())) {