[Vm-dev] [commit] r2463 - CogVM source as per VMMaker.oscog-eem.105. Fix signed32BitValueOf for most neg-

Stefan Marr squeak at stefan-marr.de
Thu Jul 21 22:17:10 UTC 2011

Hi Eliot:

On 21/07/11 19:35, Eliot Miranda wrote:
> On Thu, Jul 21, 2011 at 4:30 AM, David T. Lewis <lewis at mail.msen.com 
> <mailto:lewis at mail.msen.com>> wrote:
>     Hi Eliot,
>     Can you say what the issue was with signed32BitValueOf? I can
>     see the changes in InterpreterPrimitives>>signed32BitValueOf:
>     but I'm not clear on whether this is something that affects
>     Alien, or if it is something that has been causing problems
>     more generally but went unnoticed. Also, I'd like to document
>     this with a unit test, so if you can suggest a code snippet
>     that would be great.
> The unit test is in the lien tests and is the attempt to assign max 
> neg int (-2^31) through signedLongAt:put:.  The problem is due to a 
> pervasive C compiler bug with optimization.
Maybe I misread this blog post: 
(*Signed integer overflow:)*
but from that I would conclude that it is not a compiler bug, but 
undefined behavior in C instead. Thus, GCC and ICC are just doing there 
job in terms of what they are allowed to do by the spec.

Best regards

More information about the Vm-dev mailing list