[Gambas-user] Overflow error

Tobias Boege taboege at gmail.com
Wed Mar 13 23:33:32 CET 2019


On Wed, 13 Mar 2019, Gianluigi wrote:
> A friend of ours of the Italian forum gets the Overflow bus error (7) [0]
> in a program with many calculations.
> What is the probable cause, programming error or hardware error?
> 

In the interpreter, I've found two places from where this error is raised
(there might be more):

  1. When a Float or Long is converted to a Single but the Float/Long
     is too big: Print CSingle(2 ^ 500)

  2. When Date arithmetic produces a value outside of 32 bits:
     Print DateDiff(CFloat(2 ^ 50), CFloat(1), gb.Second)

The JIT compiler header adds another source of overflow checks.
Without the source code -- who can know?

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list