Re: [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup

timrowledge
 
As a side issue here, does anyone have a pointer to an intelligible document about using git? I've tried assorted sources and so far none of it really makes a lot of sense. I can manage a `git clone URL` and that's about it. How can I get a particular historical version, for example?

Are any of the dummies guide or similar things available online? A good tutorial?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
You never finish a program, you just stop working on it.


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup

timrowledge
 


> On 2020-03-16, at 12:26 PM, Jakob Reschke <[hidden email]> wrote:
>
> tim Rowledge <[hidden email]> schrieb am Mo., 16. März 2020, 18:47:
>  
> I can manage a `git clone URL` and that's about it. How can I get a particular historical version, for example?
>
> After the clone, you can do (in the cloned directory)
>
>     git checkout <commit-id/sha-1>
Thanks; I was able to change to the end-of-december sources ok. Obviously, it didn't compile properly because something else was broken :-(

In this case the SqueakFFI Prims.c test for the assorted ARM defines wasn't happy. Such fun...


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: RWD: Rewind Disk


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup

timrowledge
In reply to this post by timrowledge
 
Oops. forward here where it belongs.

Begin forwarded message:

From: tim Rowledge <[hidden email]>
Subject: Re: [squeak-dev] [Vm-dev] Squeak5.3 linux ARMv6 segfaults on startup
Date: March 16, 2020 at 4:42:43 PM PDT
To: The general-purpose Squeak developers list <[hidden email]>

It looks like sometihng caused the CogARMCompiler>>#rotateable8bitImmediate:ifTrue:ifFalse: to get translated in a way that messes up the block args for the falseBlock (which are supposed to be the requird rotation and immediate values.

What we get is
/* begin rotateable8bitImmediate:ifTrue:ifFalse: */
if ((offset27 & 0xFF) == offset27) {
/* begin machineCodeAt:put: */
aWord42 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg9, immediate5, rot5);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord42;
return 4;
}
for (i5 = 2; i5 <= 30; i5 += 2) {
if ((offset27 & (((0xFFU << i5) & 0xFFFFFFFFU) | (((usqInt)(0xFF)) >> (32 - i5)))) == offset27) {
/* begin machineCodeAt:put: */
aWord42 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg9, immediate5, rot5);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord42;
return 4;
}
}
... when we should get more like -

/* begin rotateable8bitImmediate:ifTrue:ifFalse: */
if ((offset27 & 0xFF) == offset27) {
/* begin machineCodeAt:put: */
aWord37 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg7, offset27, 0U << 1);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord37;
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l204;
}
for (i4 = 2; i4 <= 30; i4 += 2) {
if ((offset27 & (((0xFFU << i4) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i4)))) == offset27) {
rot4 = 32 - i4; <<<<<<<<<<<
immediate4 = (((usqInt) offset27) >> i4) | ((offset27 << (32 - i4)) & 0xFFFFFFFFU); <<<<<<<<<<<
/* begin machineCodeAt:put: */
aWord37 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg7, immediate4, ((sqInt)((usqInt)(rot4) << 1)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord37;
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l204;
}
}
(ignoring for a moment the desired change in the last couple of lines)

The actual code for CogARMCompiler>>#rotateable8bitImmediate:ifTrue:ifFalse: hasn't changed since 2015 so it's some other part of the system at fault. Do I recall correctly that some changes were recently made in the translator stuff for type-fiddling?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Don't diddle code to make it faster; find a better algorithm.


Begin forwarded message:

From: tim Rowledge <[hidden email]>
Subject: Re: [squeak-dev] [Vm-dev] Squeak5.3 linux ARMv6 segfaults on startup
Date: March 16, 2020 at 4:42:43 PM PDT
To: The general-purpose Squeak developers list <[hidden email]>
Reply-To: The general-purpose Squeak developers list <[hidden email]>

It looks like sometihng caused the CogARMCompiler>>#rotateable8bitImmediate:ifTrue:ifFalse: to get translated in a way that messes up the block args for the falseBlock (which are supposed to be the requird rotation and immediate values.

What we get is
/* begin rotateable8bitImmediate:ifTrue:ifFalse: */
if ((offset27 & 0xFF) == offset27) {
/* begin machineCodeAt:put: */
aWord42 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg9, immediate5, rot5);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord42;
return 4;
}
for (i5 = 2; i5 <= 30; i5 += 2) {
if ((offset27 & (((0xFFU << i5) & 0xFFFFFFFFU) | (((usqInt)(0xFF)) >> (32 - i5)))) == offset27) {
/* begin machineCodeAt:put: */
aWord42 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg9, immediate5, rot5);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord42;
return 4;
}
}
... when we should get more like -

/* begin rotateable8bitImmediate:ifTrue:ifFalse: */
if ((offset27 & 0xFF) == offset27) {
/* begin machineCodeAt:put: */
aWord37 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg7, offset27, 0U << 1);
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord37;
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l204;
}
for (i4 = 2; i4 <= 30; i4 += 2) {
if ((offset27 & (((0xFFU << i4) & 0xFFFFFFFFU) | (((usqInt) 0xFF) >> (32 - i4)))) == offset27) {
rot4 = 32 - i4; <<<<<<<<<<<
immediate4 = (((usqInt) offset27) >> i4) | ((offset27 << (32 - i4)) & 0xFFFFFFFFU); <<<<<<<<<<<
/* begin machineCodeAt:put: */
aWord37 = addrnimmror(self_in_dispatchConcretize, destReg1, srcReg7, immediate4, ((sqInt)((usqInt)(rot4) << 1)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord37;
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l204;
}
}
(ignoring for a moment the desired change in the last couple of lines)

The actual code for CogARMCompiler>>#rotateable8bitImmediate:ifTrue:ifFalse: hasn't changed since 2015 so it's some other part of the system at fault. Do I recall correctly that some changes were recently made in the translator stuff for type-fiddling?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Don't diddle code to make it faster; find a better algorithm.






tim
--
Any given program will expand to fill available memory.


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Squeak5.3 linux ARMv6 segfaults on startup

timrowledge
In reply to this post by timrowledge
 


> On 2020-03-16, at 6:01 PM, tim Rowledge <[hidden email]> wrote:
>
>
> In this case the SqueakFFI Prims.c test for the assorted ARM defines wasn't happy. Such fun...

Apparently we absolutely needed the defined(__ARM_ARCH_6__) clause, which is generated in the latest system; perhaps this lack explain the failed builds we had a batch of.

A VM built with the Dec 30 sources (as in  git checkout f954a914716e28b929ef173f2f3eae12652d86ef) and the SqueakFFIPrims.c patched as above builds a VM that runs the 5.3 release image ok (so far).

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
In /dev/null no one can hear you scream