RFR: 8259486: Replace PreserveExceptionMark with implementation for CautiouslyPreserveExceptionMark [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Mon Jan 11 13:28:05 UTC 2021
On Mon, 11 Jan 2021 13:10:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> See CR for details. This is a hopefully simple cleanup. I didn't try to reason about removing any of these except an obvious call (if you look above the patch in thread.cpp).
>> Tested with tier1-3.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix clear_pending_exception in fill_in_stack_trace.
src/hotspot/share/classfile/javaClasses.cpp line 2557:
> 2555: PreserveExceptionMark pm(Thread::current()); // not necessarily JavaThread::active().
> 2556:
> 2557: JavaThread* thread = JavaThread::active();
This should NOT be JavaThread::active() since it's passed and used as TRAPS, ie, as the current thread for creating ResourceMark and throwing exceptions. This is wrong.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2007
More information about the serviceability-dev
mailing list