Message293075
> The change announces "... clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] ...", but there is no explicit to clip the maximum to PY_SSIZE_T_MAX. Maybe there is a bug on this side too! The code should be reviewed one more time.
Ok, I checked: _PySlice_Unpack() uses _PyEval_SliceIndex() to convert the step Python object into a C Py_ssize_t, so the code is already correct: it does "clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX]" as announced ;-) I close the issue.
Thanks Serhiy for your work on fixing corner cases related to slices ;-) |
|
Date |
User |
Action |
Args |
2017-05-05 08:26:40 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka, xiang.zhang |
2017-05-05 08:26:40 | vstinner | set | messageid: <1493972800.37.0.446987743069.issue30255@psf.upfronthosting.co.za> |
2017-05-05 08:26:40 | vstinner | link | issue30255 messages |
2017-05-05 08:26:40 | vstinner | create | |
|