RFR(M): 8176506: C2: loop unswitching and unsafe accesses cause crash
rwestrel at redhat.com
Thu May 4 16:04:03 UTC 2017
Thanks for looking at this and trying it.
> I obviously prefer the first crash, so maybe you can at least only
> change the platforms which called "breakpoint()" until now?
I thought making the implementation consistent across platforms was
worthwhile but I don't have a strong opinion on this. I won't have to
troubleshoot failures on sparc so whatever works for those who do is
fine with me. What do you think, Vladimir?
> Not sure if this is easily possible, but I think an ideal solution
> would be to really execute the actual, offending load instead of
> inserting a HaltNode. That would give you a nice hs_err file on all
> platforms where the registers would even contain the offending address
> (NULL) and the offset. I think this could simplify troubleshooting in
> the case of a crash. What do you think?
It's not possible with the current implementation. We would need to turn
the Halt into an uncommon trap. My reasoning was that if we were about
to crash we could as well crash right away. It's true it could make
troubleshooting harder. Note that trying to read an object field off
heap is another bad scenario that would trigger a Halt but it might not
crash if run interpreted. Let's say we uncommon trap instead of crash in
that case, what do we do if we hit that unc several times?
More information about the hotspot-compiler-dev