RFR: JDK-8260485: Simplify and unify handler vectors in Posix signal code [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Feb 3 07:57:49 UTC 2021
On Wed, 3 Feb 2021 00:57:07 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>>
>> - Make SavedSignalHandlers use C-heap for its items
>> - Removed display-replaced-handler-logic
>> - Feedback David
>> - Merge
>> - JDK-8260485-signal-handler-improvements
>
> src/hotspot/os/posix/vmError_posix.cpp line 60:
>
>> 58: }
>> 59:
>> 60: void VMError::interrupt_reporting_thread() {
>
> I'm not clear what happened to these ?? (I'm not clear how they were used in the first place. :( )
I think they were used for path (3). When printing signal handlers, we do this little test to check - similar to what we do in Xcheck:jni - to print out if someone changed the handler under us. See:
https://github.com/openjdk/jdk/blob/cb127a4bb5d95d19eb1f5e625b600311a2490135/src/hotspot/os/posix/signals_posix.cpp#L1372
and
https://github.com/openjdk/jdk/blob/cb127a4bb5d95d19eb1f5e625b600311a2490135/src/hotspot/os/posix/signals_posix.cpp#L1389
.
But when printing signal handlers as part of a hs-err file, we replaced the hotspot signal handlers with the secondary crash handler and would trigger this test. I think this whole logic is needed just to prevent this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2251
More information about the hotspot-dev
mailing list