RFR: 8254824: SignalHandlerMark have no purpose
Robbin Ehn
rehn at openjdk.java.net
Thu Oct 15 13:23:16 UTC 2020
On Thu, 15 Oct 2020 11:43:02 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> SignalHandlerMark increase and decrease _num_nested_signal, but it is never read.
>> We have no caller to is_inside_signal_handler().
>>
>> Testing T1.
>
> src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp line 404:
>
>> 402: Thread* t = Thread::current_or_null_safe();
>> 403:
>> 404: // Must do this before SignalHandlerMark, if crash protection installed we will longjmp away
>
> Should we keep a comment (and add to other files) to the effect that:
>
> // If crash protection is installed we will longjmp away and no destructors from any RAII utility
> // object would be run. So don't use any RAII utilities here.
>
> ?
// If crash protection is installed we may longjmp away and no destructors
// for objects in this scope will be run.
// So don't use any RAII utilities before crash protection is checked.
Since even if crash protection is installed it's not certain we will longjmp and you can trust destructors after we
checked crash protection. ?
> src/hotspot/share/runtime/thread.hpp line 316:
>
>> 314: DEBUG_ONLY(bool _suspendible_thread;)
>> 315:
>> 316: public:
>
> In a product build we will have:
>
> private:
> public:
>
> is it possible the compiler may warn about this?
I don't believe so.
-------------
PR: https://git.openjdk.java.net/jdk/pull/677
More information about the hotspot-runtime-dev
mailing list