[Vm-dev] compiling the stack VM with LLVM at -Ofast

John McIntosh johnmci at smalltalkconsulting.com
Thu Oct 9 18:41:28 UTC 2014


If you supply function prototypes for the squeak memory access routines you
can get beyond the initial VM crash to the point of running many many byte
codes. You may call that a bug, but I'm sure the LLVM folks would say you
are an idiot not to have function prototypes. This enables the image to run
 upto the point when it tries to print the timestamp to the change log, our
first use of a LargeInteger

At this point when we calculate the number of seconds in the large positive
integer by rem the seconds for the day by 60 we end up with a large
positive integer of 5 bytes versus 4, but contains for example 40 . This
then is fed to the positive32BitValueOf which informs you that you are evil
as lengthOf is not 4, and the resulting prim failure causes the higher up
logic to spin up some exception handling recovery that exhausts memory.

For fun if you set

    foo->successFlag = 1;

as the first step in positive32BitValueOf
So the chain of large number calculations can run and the badly sized
integer math can somehow complete why the image will start, and play nice
until I ask for factorial 100.

At this point I was going to upgrade everything so I can see if something
was fixed in the plugin.

Also post-camp I migrated to regular work machine so using LLVM 6.x and
xCode 6.x



On Thu, Oct 9, 2014 at 11:20 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
> Hi John,
>
> On Thu, Oct 9, 2014 at 11:18 AM, John McIntosh <
> johnmci at smalltalkconsulting.com> wrote:
>
>>
>> Yes wonderful time, but was reflecting on camp when I was a child where
>> camp was out somewhere in the wilderness, cutoff from civilization and
>> giving you time to reflect on life and what you should do with this llvm
>> bug.
>>
>
> What's the bug?  The llvm folks claim their compiler passes the test
> suites and is correct (but I'm not siding with them).  So I'm very
> curious...
>
>
>>
>>
>> On Thu, Oct 9, 2014 at 11:15 AM, tim Rowledge <tim at rowledge.org> wrote:
>>
>>>
>>>
>>> On 09-10-2014, at 11:04 AM, Ken G. Brown <kbrown at mac.com> wrote:
>>>
>>> > Whatdyamean, we were civilized! :)
>>>
>>> We were better than civilised, we had coffee, cookies, muffins, pizza,
>>> fruit, tables, a projector and chocolate!
>>>
>>> Those of you that missed the 2014 Camp Smalltalk *really* missed the fun.
>>>
>>> tim
>>> --
>>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>>> Strange OpCodes: RLBM: Ruin Logic Board Multiple
>>>
>>>
>>>
>>
>>
>> --
>>
>> ===========================================================================
>> John M. McIntosh <johnmci at smalltalkconsulting.com>
>> https://www.linkedin.com/in/smalltalk
>>
>> ===========================================================================
>>
>>
>
>
> --
> best,
> Eliot
>
>


-- 
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
https://www.linkedin.com/in/smalltalk
===========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20141009/bd9a2831/attachment.htm


More information about the Vm-dev mailing list