[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2019-11-26 Thread danielen
danielen added the comment: The problem arises from this code in do_mktuple(), staring at line 394 in modsupport.c: if (**p_format == '#') { ++*p_format; if (flags & FLAG_SIZE_T) n = va_arg(*p_

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2019-11-26 Thread danielen
danielen added the comment: It is not reproducible with PY_SSIZE_T_CLEAN defined. -- ___ Python tracker <https://bugs.python.org/issue38913> ___ ___ Python-bug

[issue38913] Py_BuildValue("(s#O)", ...) segfaults if entered with exception raised

2019-11-25 Thread danielen
New submission from danielen : The following code results in a segmentation fault in CPython 3.8 while executes fines (raises a SystemError) in CPython 3.7. PyObject* debug(PyObject *self, PyObject *args) { const char * debug = "debug"; PyErr_SetString(PyExc_ValueErr