Kevin Shweh added the comment:
It looks like the fast paths for INPLACE_ADD and INPLACE_SUBTRACT in Python 2
don't have the cast-to-unsigned fix, so they're still relying on undefined
behavior. For example, in INPLACE_ADD:
/* INLINE: int + int */
register long a, b, i;
a = PyInt_AS_LONG(v);
b = PyInt_AS_LONG(w);
i = a + b;
if ((i^a) < 0 && (i^b) < 0)
goto slow_iadd;
----------
nosy: +Kevin Shweh
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7406>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com