Thanks a lot Jon!
I saw that eliot provided a fix.

Stef

On Nov 30, 2012, at 6:07 PM, Jon Anderson wrote:

> Hi all,
> 
> I don't post to lists often, but I thought some of you might be
> interested in these few lines of code that crash the CogVM on both
> Linux and Windows.  File-in the Smalltalk code below, then evaluate
> [nil crashCogVM].  The code uses [1-1] but it could use [1+1] or
> [56+98].  I put the code on nil, but that is not important either.  I
> think the important thing is that the primitive (+ or -) is evaluated
> but the result is not assigned into any variable.  Also important is
> that the code is put into a loop that I assume has been JIT optimized.
> The image I used is Pharo 1.4 one-click with latest update #14459.
> This code does not crash StackVM. Have fun! - Jon.
> 
> !UndefinedObject methodsFor: 'crash' stamp: 'JonKAnderson 11/29/2012 17:26'!
> crashCogVM
>        " Evaluate [
>                nil crashCogVM ]"
> 
>        | i |
>        i := 20.
>        1 to: i do: [:d | 1-1 ]
> ! !
> 


Reply via email to