Menu

#80 Qalculate SIGABRTs with exp($large_number)

v1.0 (example)
closed-fixed
nobody
5
2016-04-28
2008-05-24
No

This was reported in the Ubuntu bug tracker (https://bugs.launchpad.net/ubuntu/+source/qalculate-gtk/+bug/234398) for qalculate 0.9.6 and affects both command line and gtk version:

alex@fizz:~$ qalc
> exp(1)
exp(1) = approx. 2.7182818
> exp(1E10)
terminate called after throwing an instance of 'cln::runtime_exception'
what(): Out of virtual memory.
Aborted
alex@fizz:~$ qalc
> exp(-1E10)
terminate called after throwing an instance of 'cln::runtime_exception'
what(): Not a 32-bit integer: 14426950664
Aborted

Note that the above was reported on an AMD64 architecture. On my 32 bit computer it crashes with

terminate called after throwing an instance of 'cln::floating_point_overflow_exception'
what(): floating point overflow.

and

terminate called after throwing an instance of 'cln::floating_point_underflow_exception'
what(): floating point underflow.

Best,
Marcel

Discussion

  • Adam Olsen

    Adam Olsen - 2009-04-17

    I'm guessing my crash has the same cause as this one. On the off chance it isn't, here it is anyway. I'm on AMD64 and I give this input:

    1/(1−e⋅⋅(−(2⋅⋅400)⋅⋅2/(2⋅2⋅⋅512)))

    Which gives this crash:

    terminate called after throwing an instance of 'cln::floating_point_underflow_exception'
    what(): floating point underflow.
    Aborted

     
  • Jonathan Stickel

    Although I do not see a crash (0.9.7 on Mac OS X), Qalculate tries to calculate the result for a long time. I am able to abort the calculation. I wonder if this is a bug in CLN, or if Qalculate should catch that the result will be unrealistically large and abort.

     
  • Hanna K.

    Hanna K. - 2016-04-28
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     

Log in to post a comment.