[squeak-dev] Crash

Jörg Belger unique75 at web.de
Wed Feb 16 07:33:52 UTC 2022

I needed to restart it again, here are my new local values in debugger

		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

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

	numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask;
	numSlots = numLiterals + LiteralStart;

	AlternateHeaderNumLiteralsMask seems to be 0x7fff
	LiteralStart seems to be 1

For me is:

	numLiterals = ((140699864399832 >> 3)) & 0x7fff = 32763		—> does not match the debugger local, where is the 64 coming from

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?


> Am 15.02.2022 um 00:21 schrieb David T. Lewis <lewis at mail.msen.com>:
> On Mon, Feb 14, 2022 at 09:46:35PM +0100, J??rg Belger wrote:
>> 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.
> Yes, it is a macro defined in platforms/Cross/vm/sqMemoryAccess.h
> If implemented as a C function, it can be written like this (translated
> from the MemoryAccess package in the VMMaker repository, which is a
> slang implementation of the sqMemoryAccess.h macros):
> /*	Answer the object memory word, an sqInt, located at an object memory location.
> 	In the original 32-bit object memory implemention, word size was equivalent
> 	to C type long. For 64-bit object memory, the method name may be misleading
> 	because the sqInt value is of C type long long. */
> static sqInt longAt(sqInt oop) {
> 	return ((sqInt) ((((sqInt *) ((sqMemoryBase) + oop)))[0]));
> }
> Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220216/9cd745c7/attachment.html>

More information about the Squeak-dev mailing list