<div>Ugg Groan.<br></div><div><br></div><div>Given it is Clang, which is agressive on taking the undefined parts of the C standards as undefined, combined with the debug ones not crashing means that there is probably some code that looks ok but is actually taking advantage of something that is not defined in C.<br></div><div><br></div><div>We could try turning off optimization for this plugin but that is a hack and not a fix.<br></div><div><br></div><div>I might get lucky and see if I can scare some sensible  message out of Clang about what it thinks is undefined.<br></div><div><br></div><div>cheers<br></div><div><br></div><div>bruce</div><div ><br></div><div  class="ik_mail_quote"><div>On 2021-12-10T15:06:41.000+01:00, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:</div><blockquote class="ws-ng-quote"><div class="ws-ng-mail-style--480144eJzz9HPyjwAABGYBgQ"><div id="__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:#000000;text-align:left;" dir="ltr">
                                        <div><span style="font-size:13.3333px;">Hmm... Clang seems to be part of the problem. A gcc build on Ubuntu 18.04 did not crash.</span></div><div><span style="font-size:13.3333px;"><br></span></div><div><span style="font-size:13.3333px;">squeak.cog.spur_win64x64 (Windows 10 21H2)</span></div><div><span style="font-size:13.3333px;">Clang 13.0.0 - CRASH</span></div><div><span style="font-size:13.3333px;">Clang 8.0.1 - CRASH</span></div><div><span style="font-size:13.3333px;"><br></span></div><div><span style="font-size:13.3333px;">squeak.cog.spur_linux64x64 (Ubuntu 18.04)</span></div><div><span style="font-size:13.3333px;">gcc 7.5.0 - OK (with some failing tests)</span></div><div><span style="font-size:13.3333px;">Clang 9.0.0 - CRASH</span></div><div class="mb_sig-480144eJzz9HPyjwAABGYBgQ"></div>
                                        </div><hr></div><blockquote class="history_container-480144eJzz9HPyjwAABGYBgQ" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 10.12.2021 14:40:26 schrieb Marcel Taeumel <a class="defaultMailLink" href="mailto:<marcel.taeumel@hpi.de>" target="_blank" rel="noopener noreferrer"><marcel.taeumel@hpi.de></a>:</p><div style="font-family:Arial,Helvetica,sans-serif"><div id="__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:#000000;text-align:left;" dir="ltr">
                                        Hi Levente --<div><br></div><div>Windows VM crashes, too. But at a different test: #testHMACSH512Spec.</div><div><br></div><div><image.png><br></div><div><br></div><div>And the filename for the crash-dmp is broken.</div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div class="mb_sig-480144eJzz9HPyjwAABGYBgQ"></div>
                                        <blockquote class="history_container-480144eJzz9HPyjwAABGYBgQ" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px;">
                        <p style="color:#AAAAAA;margin-top:10px;">Am 10.12.2021 13:43:45 schrieb Levente Uzonyi <a class="defaultMailLink" href="mailto:<leves@caesar.elte.hu>" target="_blank" rel="noopener noreferrer"><leves@caesar.elte.hu></a>:</p><div style="font-family:Arial,Helvetica,sans-serif;"> <br>Hi Marcel,<br><br>The SHA2 plugin (primitiveSHA256ProcessBufferUpdatingHash) still<br>crashes with that VM on 64-bit linux.<br>The plugin code works with earlier versions, so it's either a VM <br>change of the past 6-9 months, a code generator bug or a compiler bug IMO.<br><br>To reproduce the crash, evaluate the following:<br><br>Installer ss<br>        project: 'Registers';<br>         install: 'Registers-Core'.<br>Installer ss<br>      project: 'Cryptography';<br>      addPackage: 'CryptographyHashing';<br>    addPackage: 'CryptographyHashingTests';<br>       install.<br>(Smalltalk classNamed: #SHA256WithSHA2PluginTest) run: #testInputs<br><br>Interestingly another test (SHA512WithSHA2PluginTest) using a very <br>similar primitive but with DoubleWords works fine. So perhaps it's an <br>alignment issue.<br><br>Assert and debug VMs do not have that issue, so it's not that easy to <br>debug it. What I found was that buffer's value at <br><a class="defaultMailLink" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/99f1116c0f7a4ba9a0bf88cf7deb276325aa2d79/src/plugins/SHA2Plugin/SHA2Plugin.c#L277" target="_blank" rel="noopener noreferrer" data-ik="ik-secure">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/99f1116c0f7a4ba9a0bf88cf7deb276325aa2d79/src/plugins/SHA2Plugin/SHA2Plugin.c#L277</a><br>was not the expected pointer, so the subsequent copying into it resulted <br>in segmentation fault.<br><br><br>Levente<br><br><br></div></blockquote></div></div></blockquote></blockquote></div>