Doubly Wierd

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

Doubly Wierd

KenDickey
 
Eliot,

First, thanks much for processing the pull request.

Build and FFI test on Cuis looks fine, but I am seeing really weird
results with Squeak5.2-18225-64bit.image

The FFI unit tests all pass green, but for ffiTestDoubles9 in a
workspace I get 42 rather than 45, with CLI output:


The 9 doubles are 1.000000 1.000000 1.000000 4.000000 5.000000 6.000000
7.000000 8.000000 9.000000

When I inspect the result, "self printString" answers '42.0' but the
"self hex" indicates 0!.

I am crawling through this, but somebody with a deeper experience of the
VM might yield faster insights.

Thanks again for all,
-KenD

SqueakFloatOddity.png (187K) Download Attachment
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: Doubly Wierd

Levente Uzonyi
 


On Tue, 26 Feb 2019, [hidden email] wrote:

> When I inspect the result, "self printString" answers '42.0' but the
"self hex" indicates 0!.

Did you buid your VM with gcc 4 or something newer?
Float >> #hex relies on primitive 38, which has issues with newer gcc
versions with optimization enabled.

Levente