<div dir="ltr">Hi Esteban,<div><br></div><div>   turns out it is a Slang bug affecting the Cogit, specifically pc-mapping.  The generateMapAt:start: method was being wrongly generated with the following types:</div><div><br></div><div><div>    unsigned char annotation;</div><div>    usqIntptr_t delta;</div><div>    sqInt i;</div><div>    AbstractInstruction *instruction;</div><div>    sqInt length;</div><div>    usqIntptr_t location;</div><div>    usqIntptr_t mapEntry;</div><div>    sqInt maxDelta;</div><div>    usqIntptr_t mcpc;</div></div><div><br></div><div>whereas they should be</div><div><br></div><div><div>    unsigned char annotation;</div><div>    sqInt delta;</div><div>    sqInt i;</div><div>    AbstractInstruction *instruction;</div><div>    sqInt length;</div><div>    usqInt location;</div><div>    sqInt mapEntry;</div><div>    sqInt maxDelta;</div><div>    usqIntptr_t mcpc;</div></div><div><br></div><div>Specifically Slang was getting the type of unsigned - unsigned wrong, answering unsigned instead of signed.  This is the operative expression:</div><div><br></div><div>      delta := mcpc - location / backEnd codeGranularity<br></div><div><br></div><div>where both mclc and location are unsigned.  I'm fixing this but now because it is in Slang, and hence will very probably cause pervasive changes throughout the generated source, I need to take care and not rush to a fix.  I'll keep you posted.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 7:35 AM, Esteban Lorenzano <span dir="ltr"><<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
I’m tumbling into an error in Pharo, because we use callbacks intensively, in Athens(cairo)-to-World conversion in particular, and people is sending always their crash reports… we made the whole conversion a lot more robust since problems started to arise, but now I hit a wall I cannot solve: I think problem is in something in callbacks.<br>
<br>
And problem is showing very easy on 64bits (while in 32bits it takes time and is more random).<br>
<br>
Here is the easiest way to reproduce it (in mac):<br>
<br>
wget <a href="http://files.pharo.org/get-files/60/pharo64-mac-latest.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/<wbr>pharo64-mac-latest.zip</a><br>
wget <a href="http://files.pharo.org/get-files/60/pharo64.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/<wbr>pharo64.zip</a><br>
wget <a href="http://files.pharo.org/get-files/60/sources.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/<wbr>sources.zip</a><br>
unzip pharo64-mac-latest.zip<br>
unzip pharo64.zip<br>
unzip sources.zip<br>
./Pharo.app/Contents/MacOS/<wbr>Pharo ./Pharo64-60438.image eval "VGTigerDemo runDemo"<br>
<br>
eventually (like 5-6 seconds after, if not immediately), you will have a stack like this:<br>
<br>
SmallInteger(Object)>><wbr>primitiveFailed:<br>
SmallInteger(Object)>><wbr>primitiveFailed<br>
SmallInteger(<wbr>VMCallbackContext64)>><wbr>primSignal:andReturnAs:<wbr>fromContext:<br>
GrafPort>>copyBits<br>
GrafPort>>image:at:sourceRect:<wbr>rule:<br>
FormCanvas>>image:at:<wbr>sourceRect:rule:<br>
FormCanvas(Canvas)>>drawImage:<wbr>at:sourceRect:<br>
FormCanvas(Canvas)>>drawImage:<wbr>at:<br>
VGTigerDemo>>runDemo<br>
VGTigerDemo class>>runDemo<br>
UndefinedObject>>DoIt<br>
OpalCompiler>>evaluate<br>
OpalCompiler(AbstractCompiler)<wbr>>>evaluate:<br>
[ result := Smalltalk compiler evaluate: aStream.<br>
self hasSessionChanged<br>
        ifFalse: [ self stdout<br>
                        print: result;<br>
                        lf ] ] in EvaluateCommandLineHandler>><wbr>evaluate: in Block: [ result := Smalltalk compiler evaluate: aStream....<br>
BlockClosure>>on:do:<br>
EvaluateCommandLineHandler>><wbr>evaluate:<br>
EvaluateCommandLineHandler>><wbr>evaluateArguments<br>
EvaluateCommandLineHandler>><wbr>activate<br>
EvaluateCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>
[ aCommandLinehandler activateWith: commandLine ] in PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>activateSubCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]<br>
BlockClosure>>on:do:<br>
PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>activateSubCommand:<br>
PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>handleSubcommand<br>
PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>handleArgument:<br>
[ self<br>
        handleArgument:<br>
                (self arguments<br>
                        ifEmpty: [ '' ]<br>
                        ifNotEmpty: [ :arguments | arguments first ]) ] in PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>activate in Block: [ self...<br>
BlockClosure>>on:do:<br>
PharoCommandLineHandler(<wbr>BasicCommandLineHandler)>><wbr>activate<br>
PharoCommandLineHandler>><wbr>activate<br>
PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>
[ super activateWith: aCommandLine ] in PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]<br>
<br>
Any idea?<br>
<br>
thanks!<br>
<span class="HOEnZb"><font color="#888888">Esteban</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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>
</div>