rongxin added the comment:
Josh Rosenberg, thanks for your useful comments.
--
___
Python tracker
<https://bugs.python.org/issue35842>
___
___
Python-bugs-list m
Change by rongxin :
--
resolution: not a bug ->
___
Python tracker
<https://bugs.python.org/issue35842>
___
___
Python-bugs-list mailing list
Unsubscrib
rongxin added the comment:
I think this bug is valid at least in Python 2.7, as I mentioned the
implementation of _PyEval_SliceIndex is different from the one in Python 3.8.
The condition " if (v != NULL && v != Py_None) " will bypass the NULL pointer
dereference. Woul
rongxin added the comment:
Hi, Josh Rosenberg. As you mentioned PySlice_New (which is ultimately
responsible for all slice construction) explicitly replaces any argument of
NULL with Py_None, I am not sure whether this is always true r->stop cannot be
NULL. I detected this bug using
rongxin added the comment:
BTW, if this bug is true, there is a similar code snippet in the same file.
mmapmodule.c:
845 static int
846 mmap_ass_subscript(mmap_object *self, PyObject *item, PyObject *value)
847 {
...
888else if (PySlice_Check(item)) {
889Py_ssize_t start, stop
New submission from rongxin :
In the source file mmapmodule.c, the function mmap_subscript contains a
potential bug about the use of uninitialised variable.
mmapmodule.c:
764 static PyObject *
765 mmap_subscript(mmap_object *self, PyObject *item)
766 {
...
else if (PySlice_Check(item