RFR: 8251438: Issues with our POSIX set_signal_handler()
Thomas Stuefe
stuefe at openjdk.java.net
Fri Dec 11 08:37:54 UTC 2020
On Fri, 11 Dec 2020 06:29:06 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> This is a fix for a potential issue involving "The storage occupied by sa_handler and sa_sigaction may overlap, and a conforming application shall not use both simultaneously." https://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html, when we in fact do assume different storages.
>
> Hi Gerard,
>
> I was confused about the patch. Its fine from a simplification standpoint - putting all those ? expressions into one place - but where were we relying on different storage?
>
> Cheers, Thomas
> _Mailing list message from [David Holmes](mailto:david.holmes at oracle.com) on [hotspot-runtime-dev](mailto:hotspot-runtime-dev at openjdk.java.net):_
>
> Hi Thomas,
>
> On 11/12/2020 5:22 pm, Thomas Stuefe wrote:
>
> > On Mon, 7 Dec 2020 21:45:57 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
> > > This is a fix for a potential issue involving "The storage occupied by sa_handler and sa_sigaction may overlap, and a conforming application shall not use both simultaneously." https://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html, when we in fact do assume different storages.
> >
> >
> > Hi Gerard,
> > I was confused about the patch. Its fine from a simplification standpoint - putting all those ? expressions into one place - but where were we relying on different storage?
>
> We were reading both fields from the same structure without checking the
> flag value:
>
> void* oldhand = oldAct.sa_sigaction
> ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction)
> : CAST_FROM_FN_PTR(void*, oldAct.sa_handler);
>
> Cheers,
> David
Ah, I missed that. Thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/1680
More information about the hotspot-runtime-dev
mailing list