[Vm-dev] Time primHighResClock truncated to 32 bits in 64 bits VMs.
JuanVuletich at zoho.com
Thu Dec 28 12:32:46 UTC 2017
In 32 bit Cog VMs, `Time primHighResClock` answers LargePositiveInteger,
presumably up to 64 bits. This would mean a rollover in 167 years on a
But on 64 bit Cog and Stack Spur VMs, it answers a SmallInteger that is
truncated to 32 bits. This means a rollover in about one second.
I guesss this is a bug. Answering a SmallInteger, truncating the CPU 64
bit counter to 60 bits would be ok. I think it makes sense to restrict
answer to SmallInteger to avoid allocation, and a rollover every 41
years is not too much :)
More information about the Vm-dev