RFR: 8263603: Remove leftovers of "FPE_FLT..." type signals from regular signal handling code [v3]

Gerard Ziemski gziemski at openjdk.java.net
Thu Mar 25 15:09:46 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 have a generic handling of `FPE_FLT`, but we report it as OS bug that needs to be investigated.

Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:

  change from fatal error to an assert

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3175/files
  - new: https://git.openjdk.java.net/jdk/pull/3175/files/6aed7506..82102386

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3175&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3175&range=01-02

  Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 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