RFR: 8263603: Remove leftovers of "FPE_FLT..." type signals from regular signal handling code
Gerard Ziemski
gziemski at openjdk.java.net
Wed Mar 24 15:58:55 UTC 2021
hello everyone,
Signal handling code is complex as it is, this enhancement removes, incorrect, catching & handling of `FPE_FLT` types of signals.
It's incorrect, because:
- We wouldn't want to generate/catch a floating point div by zero instructions, which by default do not cause a crash (only integer div by 0 cause crash)
- We can't catch them because that would require us to set **FPU** to raise such signals, which we don't do
- Even if we wanted to generate **FPU** signals, those only originate in **x87 FPU**, which we are not using (we use **SSE** instructions for floating point arithmetic instead) on **x86_64** architecture. Finally the API to turn it on is not even available on macOS at all (it's seems to be available on Linux, but I don't know what it actually does on **64 bit** architecture, if anything)
If we were to catch `FPE_FLT` signal it most likely is a bug in the OS itself, like for example [JDK-8261397](https://bugs.openjdk.java.net/browse/JDK-8261397)
In anticipation of such scenarios we leave generic handling of `FPE_FLT`, but we report it as OS bug that needs to be investigated.
-------------
Commit messages:
- remove unused FPE_FLT signal processing and replace with generic catch
Changes: https://git.openjdk.java.net/jdk/pull/3175/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3175&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8263603
Stats: 16 lines in 3 files changed: 9 ins; 2 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/3175.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/3175/head:pull/3175
PR: https://git.openjdk.java.net/jdk/pull/3175
More information about the hotspot-runtime-dev
mailing list