[asterisk-bugs] [JIRA] (ASTERISK-18722) ast_expr2 reports "op_times: overflow" on some calculations, though the number is calculated correctly.

Joshua Colp (JIRA) noreply at issues.asterisk.org
Tue Dec 19 06:31:07 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-18722:
-----------------------------------

    Affects Version/s: 13.18.4

> ast_expr2 reports "op_times: overflow" on some calculations, though the number is calculated correctly.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-18722
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-18722
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Configuration
>    Affects Versions: SVN, 1.6.2.20, 13.18.4
>         Environment: CentOS 5.7 32 and 64 Bit
>            Reporter: Ian Anderson
>            Severity: Minor
>
> It seems when Asterisk 1.6.20 (may affect alter versions as the ast_expr2.y code looks same in SVN) does some multiplication (and I believe division) calculations, it will report an overflow error when checking the results.
> Eg. Set(test=$[((0.0046 * 30) / 20) + ((0.0046 * 1) / 10)])
> results in Asterisk returning test=0.00736 (CORRECT) however this is seen in the console
> [Oct 13 17:56:16] WARNING[3153]: ast_expr2.y:1458 op_times: overflow
> It appears that when the chk_times is run (also may affect chk_div),the reversed calcuation doesn't equal (floating point issue?) and thus the warning is generated.  Depending on the numbers in the calculation the error may or may not appear, but when it appears it is always reproducable with the same numbers.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list