[issue34423] Overflow when casting from double to time_t, and_PyTime_t.

Michał Radwański report at bugs.python.org
Thu Aug 23 12:19:02 EDT 2018


Michał Radwański <lisklusownik at gmail.com> added the comment:

Although you're right - this issue is specific to pytime.c, when _Py_InIntegralTypeRange() is used with a double, it is actually true that _Py_InIntegralTypeRange() is used with double, in pytime.c only (as a quick recursive grep discovers).

Perhaps the macro should be renamed not to cause confusion (include note about floating point, or define it as a function).

I don't have good idea on how this issue could be resolved otherwise.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34423>
_______________________________________


More information about the Python-bugs-list mailing list