RFR: 8259486: Replace PreserveExceptionMark with implementation for CautiouslyPreserveExceptionMark

Coleen Phillimore coleenp at openjdk.java.net
Mon Jan 11 13:06:02 UTC 2021


On Mon, 11 Jan 2021 12:55:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.cpp line 2556:
>> 
>>> 2554: 
>>> 2555:   JavaThread* thread = JavaThread::active();
>>> 2556:   PreserveExceptionMark pm(thread);
>> 
>> The result of JavaThread::active() is not necessarily the current thread. So either the new code is wrong or else we should just be using JavaThread::current()
>
> My first iteration of this change knew there was a difference then I cleaned it up.  I'll restore the Thread::current() in the PEM constructor.

annoyingly every caller of fill_in_stack_trace has the current thread.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2007


More information about the serviceability-dev mailing list