[issue35842] A potential bug about use of uninitialised variable

2019-01-29 Thread rongxin
rongxin added the comment: Josh Rosenberg, thanks for your useful comments. -- ___ Python tracker <https://bugs.python.org/issue35842> ___ ___ Python-bugs-list m

[issue35842] A potential bug about use of uninitialised variable

2019-01-28 Thread rongxin
Change by rongxin : -- resolution: not a bug -> ___ Python tracker <https://bugs.python.org/issue35842> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue35842] A potential bug about use of uninitialised variable

2019-01-28 Thread rongxin
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

[issue35842] A potential bug about use of uninitialised variable

2019-01-28 Thread rongxin
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 us

[issue35842] A potential bug about use of uninitialised variable

2019-01-28 Thread rongxin
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

[issue35842] A potential bug about use of uninitialised variable

2019-01-28 Thread rongxin
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