--- old/src/hotspot/share/runtime/jniHandles.cpp 2020-02-19 21:30:06.623706622 -0500 +++ new/src/hotspot/share/runtime/jniHandles.cpp 2020-02-19 21:30:04.922687715 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -265,8 +265,7 @@ // as the java command executable, in which case, this type of handle // is not permitted. return (thr->has_last_Java_frame() && - (void*)handle < (void*)thr->stack_base() && - (void*)handle >= (void*)thr->last_Java_sp()); + thr->is_in_stack_range_incl((address)handle, (address)thr->last_Java_sp())); }