[Gambas-user] Possible error when doing math on bytes

Benoit Minisini benoit.minisini at gambas-basic.org
Wed Jan 4 17:13:16 CET 2023


Le 04/01/2023 à 17:11, Benoit Minisini a écrit :
> Le 04/01/2023 à 13:14, Brian G a écrit :
>> Thank you
>>
>> -- 
>> Thanks
>> Brian G
>>
> 
> Hi,
> 
> The last commit has now a new 'System.IgnoreOverflow' property that 
> allows to toggle overflow detection off (it is TRUE by default).
> 
> Can you try it?
> 
> I didn't want to make an environment variable for that. Even if 
> praticle, I find it dangerous. I prefer it to be explicit in the code.
> 
> Beware that it has no effect on JIT compiled code, for performance 
> reasons. JIT compiled code always checks for overflow, except when the 
> UNSAFE keyword is used.
> 
> Regards,
> 

By the way, this features relies on an undocumented but logical 
behaviour of the overflow detection macros of gcc.

So it works on x86 architecture with gcc and probably clang. For the 
others I can't give a guarantee.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list