[issue35959] math.prod(range(10)) caues segfault
Mark Dickinson
report at bugs.python.org
Mon Feb 11 09:57:33 EST 2019
Mark Dickinson <dickinsm at gmail.com> added the comment:
@Pablo: Thanks; I saw the PR.
It looks as though the troublesome line
long x = i_result * b;
is still there in that PR, though. Or am I misreading? The difficulty here is that the check for overflow has to happen as a means of preventing invoking undefined behaviour; it doesn't really work to invoke the undefined behaviour first and then check to see what went wrong.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35959>
_______________________________________
More information about the Python-bugs-list
mailing list