You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty sure the #if PY_MAJOR_VERSION < 3 and if (!str_value) throw error_already_set(); lines are the wrong way around. As it stands, on Python 3 then if the PyObject_Str() call fails then a nullptr becomes the ptr held by a py::str object, leading to possible segfaults.
The text was updated successfully, but these errors were encountered:
In the sample below:
pybind11/include/pybind11/pytypes.h
Lines 928 to 936 in 25abf7e
I'm pretty sure the
#if PY_MAJOR_VERSION < 3
andif (!str_value) throw error_already_set();
lines are the wrong way around. As it stands, on Python 3 then if thePyObject_Str()
call fails then a nullptr becomes the ptr held by apy::str
object, leading to possible segfaults.The text was updated successfully, but these errors were encountered: