[New-bugs-announce] [issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'
Jeffrey Walton
report at bugs.python.org
Sat Mar 15 22:48:45 CET 2014
New submission from Jeffrey Walton:
pytime.c:184: runtime error: value -1e+200 is outside the range of representable values of type 'long'
and
pytime.c:218: runtime error: value -1e+200 is outside the range of representable values of type 'long'
It appears the cast on 'intpart' is generating the finding. 'intpart' is a double.
*sec = (time_t)intpart;
err = intpart - (double)*sec;
if (err <= -1.0 || err >= 1.0) {
error_time_t_overflow();
return -1;
}
Shouldn't a range test based on TIME_T_MAX with an epsilon occur first?
----------
components: Tests
hgrepos: 223
messages: 213686
nosy: Jeffrey.Walton
priority: normal
severity: normal
status: open
title: pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20941>
_______________________________________
More information about the New-bugs-announce
mailing list