<p></p>
<p dir="auto">This I what I get in the VS2022 debugger. Of course, at the moment I do not understand the code there, but maybe hopefully Eliot can see something interesting in it.  I leave VS open and look tomorrow at the code, maybe I understand a bit of it :-)</p>
<p dir="auto">Seems there is something wrong with the forward pointers. I assume the longAt(referent) fails? I guess it is a macro, but VS could not find the definition.</p>
<p dir="auto">########## Code area - the --> line is failing with access violation ###########</p>
<p dir="auto">/* begin literalCountOfMethodHeader: <em>/<br>
assert((((header) & 7) == 1));<br>
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask;<br>
numSlots = numLiterals + LiteralStart;<br>
l9:     /</em> end numStrongSlotsOf:format:ephemeronInactiveIf: */;<br>
for (i = 0; i < numSlots; i += 1) {<br>
referent = longAt((referrer + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord())))));<br>
if ((!(referent & (tagMask())))) {</p>
<pre><code>         /* a forwarding pointer could be because of become: or scavenging. */
</code></pre>
<p dir="auto">-->                    if ((!((longAt(referent)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun()))))) {<br>
/* begin followForwarded: <em>/<br>
assert(isUnambiguouslyForwarder(referent));<br>
/</em> begin fetchPointer:ofMaybeForwardedObject: <em>/<br>
referent1 = longAt((referent + BaseHeaderSize) + (0U << (shiftForWord())));<br>
while (((!(referent1 & (tagMask()))))<br>
&& ((!((longAt(referent1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {<br>
/</em> begin fetchPointer:ofMaybeForwardedObject: */<br>
referent1 = longAt((referent1 + BaseHeaderSize) + (0U << (shiftForWord())));<br>
}<br>
referent = referent1;</p>
<p dir="auto">########## Call stack ############</p>
<p dir="auto">Squeak.exe!scavengeReferentsOf(__int64 referrer) Zeile 42680<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (42680)<br>
Squeak.exe!scavengeRememberedSetStartingAt(__int64 n) Zeile 42760<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (42760)<br>
Squeak.exe!scavengeLoop() Zeile 42542<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (42542)<br>
Squeak.exe!doScavenge(__int64 tenuringCriterion) Zeile 47599<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (47599)<br>
Squeak.exe!scavengingGCTenuringIf(__int64 tenuringCriterion) Zeile 57959<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (57959)<br>
Squeak.exe!sufficientSpaceAfterGC(__int64 numBytes) Zeile 58691<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (58691)<br>
Squeak.exe!checkForEventsMayContextSwitch(__int64 mayContextSwitch) Zeile 62762<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (62762)<br>
Squeak.exe!handleStackOverflowOrEventAllowContextSwitch(<strong>int64 mayContextSwitch) Zeile 66037<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (66037)<br>
Squeak.exe!ceStackOverflow(<strong>int64 contextSwitchIfNotNil) Zeile 15593<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (15593)<br>
[Externer Code]<br>
Squeak.exe!ioInitHeartbeat() Zeile 420<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\platforms\win32\vm\sqWin32Heartbeat.c (420)<br>
Squeak.exe!interpret() Zeile 2875<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\src\spur64.cog\cointerp.c (2875)<br>
Squeak.exe!sqMain(int argc, char * * argv) Zeile 1761<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\platforms\win32\vm\sqWin32Main.c (1761)<br>
Squeak.exe!WinMain(HINSTANCE</strong> * hInst, HINSTANCE</strong> * hPrevInstance, char * lpCmdLine, int nCmdShow) Zeile 1851<br>
unter C:\Users\joerg\Persoenlich\Entwicklung\Squeak\vmssource\trunk\platforms\win32\vm\sqWin32Main.c (1851)<br>
[Externer Code]</p>
<p dir="auto">########## Locals ############</p>
<pre><code> classFormat     662660168776    __int64
        contextSize     72198296718755736       __int64
        fmt     2       __int64
        foundNewReferentOrIsWeakling    0       __int64
        header  140698790658008 __int64
        header1 140698758633160 __int64
        i       37029628        __int64
        newLocation     811789632       __int64
        numLiterals     64      __int64
        numSlots        167772160       __int64
        numSlots1       255     unsigned __int64
        numSlots2       167772160       unsigned __int64
        objOop1 72057594139401638       __int64
        referent        139599658561184 __int64
        referent1       0       __int64
        referrer        140700938141704 __int64
        sp      72058702004626295       __int64
</code></pre>
<p dir="auto">############## Second try ##################</p>
<p dir="auto">I needed to restart it again, here are my new local values in debugger</p>
<pre><code> classFormat     973468582328    __int64
        contextSize     72198310804720808       __int64
        fmt     2       __int64
        foundNewReferentOrIsWeakling    0       __int64
        header  140699864399832 __int64
        header1 140698758633160 __int64
        i       81749860        __int64
        newLocation     2070121416      __int64
        numLiterals     64      __int64
        numSlots        335544320       __int64
        numSlots1       255     unsigned __int64
        numSlots2       335544320       unsigned __int64
        objOop1 72057594296693111       __int64
        referent        139620721982368 __int64
        referent1       0       __int64
        referrer        140711869546504 __int64
        sp      72058702004626295       __int64
</code></pre>
<p dir="auto">numSlots seems to me very wrong. If I do some calculations I get also not the same value that the debugger says me. Here is the code</p>
<pre><code>numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask;
numSlots = numLiterals + LiteralStart;

AlternateHeaderNumLiteralsMask seems to be 0x7fff
LiteralStart seems to be 1
</code></pre>
<p dir="auto">For me is:</p>
<pre><code>numLiterals = ((140699864399832 >> 3)) & 0x7fff = 32763                —> does not match the debugger local, where is the 64 coming from
</code></pre>
<p dir="auto">Seems to me somebody has overridden already the „header“ variable, which seems to be wrong. Could it be that some other thread is writing in the wrong memory area and override my values?</p>
<p dir="auto">Jörg</p>
<p dir="auto">##########  System Information ##############</p>
<p dir="auto">Gerätename       timemachine<br>
Prozessor       AMD Ryzen 9 3900X 12-Core Processor               3.80 GHz<br>
Installierter RAM       32,0 GB<br>
Geräte-ID      F6FA897B-DDB1-44D6-9BF3-8BD1110AA754<br>
Produkt-ID      00326-10048-08575-AA867<br>
Systemtyp       64-Bit-Betriebssystem, x64-basierter Prozessor<br>
Stift- und Toucheingabe Für diese Anzeige ist keine Stift- oder Toucheingabe verfügbar.</p>
<p dir="auto">Edition   Windows 10 Home<br>
Version 20H2<br>
Installiert am  ‎23.‎03.‎2021<br>
Betriebssystembuild     19042.1526<br>
Leistung        Windows Feature Experience Pack 120.2212.4170.0</p>
<p dir="auto">Visual Studio 2022<br>
win64x64\squeak.cog.spur<br>
VM version ???   I ask Eliot how i can see that on my current local github clone and post it later</p>
<p dir="auto">############# Code for reproducation ##############</p>
<p dir="auto">Simply execute the following Smalltalk code. Maybe you need to run it multiple times, for me the crash happens sometimes at the 3rd or 4th try.</p>
<p dir="auto">| oc |<br>
oc := OrderedCollection new.<br>
400000000 timesRepeat: [oc add: Object new]</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/614">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWYQZPOIRARK3K5F773U32RSZANCNFSM5OY6TTUQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AIJPEWYUGDN7CZYV7DSECRDU32RSZA5CNFSM5OY6TTU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RBLPADA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><OpenSmalltalk/opensmalltalk-vm/issues/614</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/614",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/614",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>