RFR: 8286182: C2: crash with SIGFPE when executing compiled code
Martin Doerr
mdoerr at openjdk.java.net
Tue May 17 17:18:56 UTC 2022
On Mon, 16 May 2022 12:36:43 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
> The bug is not assigned to me, but I have seen that the C2 code which checks for div by 0 is not aware of the new nodes from [JDK-8284742](https://bugs.openjdk.java.net/browse/JDK-8284742).
> This fixes the VM to pass the reproducer. I'm not sure if more opcode checks are required to get added.
Btw. it is possible to make the div node dependent on only one check by using the following scheme for a/b with unsigned comparison:
if (b+1 >u 1) return a/b; // <-1 or >0
else if (b==0) arithmetic_exception();
else return -a; // div by -1
It could be transformed back later to enable implicit div by 0 checks. Sounds complicated and I don't know if this makes sense.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8726
More information about the hotspot-compiler-dev
mailing list