<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Joel,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks a lot for reporting this. I have filed an issue in JBS:
<a href="https://bugs.openjdk.org/browse/JDK-8329555">https://bugs.openjdk.org/browse/JDK-8329555</a>.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Sandhya<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> panama-dev <panama-dev-retn@openjdk.org> <b>On Behalf Of
</b>Joel Knighton<br>
<b>Sent:</b> Monday, April 01, 2024 3:50 PM<br>
<b>To:</b> panama-dev@openjdk.org<br>
<b>Subject:</b> [New Bug] Reliable C2 Crash in intrinsifying heap-based MemorySegment Vector store/loads<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I've uploaded a small, reliable reproducer here: <a href="https://gist.github.com/jkni/e9b569d406a9f4d4f2766e80f9e904d2">https://gist.github.com/jkni/e9b569d406a9f4d4f2766e80f9e904d2</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">For me, this reliably reproduces the issue on x86 under UseAVX=2 or UseAVX=3.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I've also attached an excerpt of hs_err (full contents available upon request, but I expect this should be sufficient): <a href="https://gist.github.com/jkni/d31c5c2a77de0070f7066c093b4efac9">https://gist.github.com/jkni/d31c5c2a77de0070f7066c093b4efac9</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Joel Knighton<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>