RFR: 8263603: Remove leftovers of "FPE_FLT..." type signals from regular signal handling code [v2]
Gerard Ziemski
gziemski at openjdk.java.net
Fri Mar 26 15:01:27 UTC 2021
On Thu, 25 Mar 2021 15:00:36 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Hi Gerard,
>>
>> Thanks for tackling this one.
>>
>> I'm not certain we should make this a fatal condition rather than just printing a warning and throwing the exception. Perhaps use an assert.
>>
>> Thanks,
>> David
>
>> Hi Gerard,
>>
>> Thanks for tackling this one.
>>
>> I'm not certain we should make this a fatal condition rather than just printing a warning and throwing the exception. Perhaps use an assert.
>>
>> Thanks,
>> David
>
> Thank you David for the review.
>
> I figured that if we were to get such unexpected signal we would be in unknown territory, but I can change it to assert instead.
> _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 Gerard,
>
> On 26/03/2021 1:03 am, Gerard Ziemski wrote:
>
> > On Thu, 25 Mar 2021 07:19:17 GMT, David Holmes <dholmes at openjdk.org> wrote:
> > > Hi Gerard,
> > > Thanks for tackling this one.
> > > I'm not certain we should make this a fatal condition rather than just printing a warning and throwing the exception. Perhaps use an assert.
> > > Thanks,
> > > David
> >
> >
> > Thank you David for the review.
> > I figured that if we were to get such unexpected signal we would be in unknown territory, but I can change it to assert instead.
>
> Note that I also suggested that we throw the exception. I don't think we
> can just do nothing here as it implies we'd return potential junk to a
> FP computation. Though in that case is there actually any point in
> making any changes to this code?
>
> While we no longer use the x87 co-processor in hotspot code, I'm
> concerned there may be legacy third-party libraries that may still use
> it via their own native code, and so potentially enable and trigger
> these floating-point signals.
I'm not sure we were ever enabling x87 signals. I seriously doubt we ever wanted to do that (on purpose) or that we had it in fact ever enabled.
3rd parties could/should add their own signal exception handling for x87 FPU if they want it. Those are very domain specific, and if they wanted them they would certainly not want us handling them.
I think this is a very dead code, that unnecessarily complicates our signal handling with zero benefit and I personally would love to see it go away, especially now that we have an understanding of what FPE_FLT signals are. There is enough signal handling code that we do need to support as it is.
Is that a good enough argument, or are you still unconvinced and you don't want to see it fixed?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3175
More information about the hotspot-runtime-dev
mailing list