Closed uxhg closed 6 years ago
Hello,
Thank you for the bug report. We have reproduced the error:
C-style arbitrary precision calculator (version 2.12.6.8) Calc is open software. For license details type: help copyright [Type "exit" to exit, or "help" for help.]
; a=sin(2E9i) ; strerror(a) "Too-large im(argument) for sin" ; b=cos(2E9i) ; strerror(b) "Too-large im(argument) for cos" ; tan(2E9i) Segmentation fault: 11
with the most recent pre-release (2.12.6.8) and are working on a fix.
Hello,
We have a potential fix for this class of bug that we are testing for calc version 2.12.6.9.
The following are the changes from calc version 2.12.6.9 to date:
Fixed a number of core dump bugs related to the calculation of
tan(), cot(), sec(), csc(), tanh(), coth(), sech(), and csch(),
asin(), acos(), asinh(), acosh(), where when a call to an
underlying function produced an invalid value. Thanks goes to
github user wuxiuheng for reporting this problem.
A number of trigonometric and hyperbolic functions that incorrectly
returned E_LOGINF, now return a new error code that is more
specific to the trigonometric or hyperbolic function. The
following is a list of these new error codes: E_TAN3 E_TAN4
E_COT3 E_COT4 E_SEC3 E_CSC3 E_TANH3 E_TANH4 E_COTH3 E_COTH4
E_SECH3 E_CSCH3 E_ASIN3 E_ACOS3 E_ASINH3 E_ACOSH3 E_ATAN3 E_ACOT3
E_ASEC3 E_ACSC3 E_ATANH3 E_ACOTH3 E_ASECH3 E_ACSCH3.
When calc version 2.12.6.9 is released, this issue will be fixed.
FYI: Pushed the above mentioned fix to the master branch, along with some regression tests.
While sin(x) and cos(x) prompted a "too large argument" error, calculating tan(x) and cot(x) with x being a big complex number led to a crash.
Re-run with ASAN shows it was a
member access within null pointer of type 'struct COMPLEX'