[New Bug] Reliable C2 Crash in intrinsifying heap-based MemorySegment Vector store/loads

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Tue Apr 2 20:57:25 UTC 2024


Hi Joel,

Thanks a lot for reporting this. I have filed an issue in JBS: https://bugs.openjdk.org/browse/JDK-8329555.

Best Regards,
Sandhya

From: panama-dev <panama-dev-retn at openjdk.org> On Behalf Of Joel Knighton
Sent: Monday, April 01, 2024 3:50 PM
To: panama-dev at openjdk.org
Subject: [New Bug] Reliable C2 Crash in intrinsifying heap-based MemorySegment Vector store/loads

Hello,

I'm experiencing a reliable JVM crash from C2 compilation threads that's reproducible on the latest release of 22 as well as fastdebug builds of the master branch. This appears to have been introduced by JDK-8319111. Post-8319111, it is possible to attempt to intrinsify a store/load of a mismatched vector through inline_vector_mem_operation when the mem_elem_bt is T_ILLEGAL. This causes the C2 thread to crash in type2aelembytes (fastdebug) or vector_width_in_bytes (release). Patching to fail intrinsifying in these cases does eliminate the crash for me, but I'm not exceedingly familiar with this area of the codebase, so I may be missing other similar issues.

I've uploaded a small, reliable reproducer here: https://gist.github.com/jkni/e9b569d406a9f4d4f2766e80f9e904d2
For me, this reliably reproduces the issue on x86 under UseAVX=2 or UseAVX=3.

I've also attached an excerpt of hs_err (full contents available upon request, but I expect this should be sufficient): https://gist.github.com/jkni/d31c5c2a77de0070f7066c093b4efac9

I've been unable to locate any sign of this bug already being filed. Is there any other additional information I could provide that would be helpful?

Best,
Joel Knighton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240402/673f090d/attachment-0001.htm>


More information about the panama-dev mailing list