RFR: JDK-8260485: Simplify and unify handler vectors in Posix signal code [v7]
Thomas Stuefe
stuefe at openjdk.java.net
Fri Feb 19 06:43:46 UTC 2021
On Thu, 18 Feb 2021 19:14:38 GMT, Gerard Ziemski <gziemski 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 12 additional commits since the last revision:
>>
>> - Style fixes
>> - expected_handlers->vm_handlers
>> - Merge
>> - Use universal zero initializer for do_check_signal_periodically
>> - Further fixes
>> - Fix build error on zlinux
>> - David Feedback
>> - Make SavedSignalHandlers use C-heap for its items
>> - Removed display-replaced-handler-logic
>> - Feedback David
>> - ... and 2 more: https://git.openjdk.java.net/jdk/compare/a185aa91...5cf58186
>
> Marked as reviewed by gziemski (Committer).
Thanks Gerard and David!
About const correctness, I looked into this. Looked mostly straightforward, apart from the one fact that inside call_chained_handler, we modify the handed over sigaction structure. Which is really yucky. Especially if you consider that this function is called also for the libjsig case, where the sigaction structure is handed in from the libjsig, so we essentially modify memory in libjsig.
We do this for two reasons, one is to just have a holder for a temporary sigset, which would be trivial to fix with a temporary local variable. And then, to switch off chaining for SA_NODEFER (mimicking one shot semantics). And while looking into that, I saw that one shot semantics can never have worked reliably. I guess its like David said in other places, its a best effort thing.
The whole investigation turned out too deep for this RFE, so I leave that for another day (https://bugs.openjdk.java.net/browse/JDK-8262006).
@gerard-ziemski : I also created https://bugs.openjdk.java.net/browse/JDK-8262007 to track the renaming you wanted. Left it unassigned, feel free to grab that one.
Cheers, Thomas
-------------
PR: https://git.openjdk.java.net/jdk/pull/2251
More information about the hotspot-dev
mailing list