This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients serhiy.storchaka, vstinner, xiang.zhang
Date 2017-05-05.08:26:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493972800.37.0.446987743069.issue30255@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 ;-)
History
Date User Action Args
2017-05-05 08:26:40vstinnersetrecipients: + vstinner, serhiy.storchaka, xiang.zhang
2017-05-05 08:26:40vstinnersetmessageid: <1493972800.37.0.446987743069.issue30255@psf.upfronthosting.co.za>
2017-05-05 08:26:40vstinnerlinkissue30255 messages
2017-05-05 08:26:40vstinnercreate