<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Both,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">     see commit 97b4903b4b88f22c1bd11760f107852c63f9db40</div>Author: Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>><br>Date:   Sat Dec 11 11:58:58 2021 -0800<br><br>    src/plugins/SHA2Plugin/SHA2Plugin.c as per CryptographyPlugins-eem.24<br><br>    Fix crashes in primitiveSHA256ProcessBufferUpdatingHash when compiling with<br>    Clang on x86_64 due to SSE instructions which require 128-bit stack alignment.<div><br></div><div><div class="gmail_default" style="font-size:small">I need to know about any other such crashes pronto.</div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 10, 2021 at 4:43 AM Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">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 href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/99f1116c0f7a4ba9a0bf88cf7deb276325aa2d79/src/plugins/SHA2Plugin/SHA2Plugin.c#L277" rel="noreferrer" target="_blank">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>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>