New submission from Khalil <kmaat...@rapiscansystems.com>:

I Have a set of callbacks from a C extension to a Python code and I noticed 
that when I report a unicode string to the Python code, and use the Py_XDECREF 
on it then whole application crashes with the SIGSEGV signal.This is a snippet 
of the codes:

/***************************/
....
PyObject *MyString = PyUnicode_FromString("BlaBla");
PyTuple_SetItem(MyTuple, 0, MyString);
PyObject_CallObject(callback, PyTuple);

Py_XDECREF(MyString);
Py_XDECREF(MyTuple);
...
/***********************************/

when I create my string within the set item then it works fine, like below:
....
PyTuple_SetItem(MyTuple, 0, PyUnicode_FromString("BlaBla"));
PyObject_CallObject(callback, PyTuple);
Py_XDECREF(MyTuple);
...

----------
components: Extension Modules
messages: 342642
nosy: Khalilmtg
priority: normal
severity: normal
status: open
title: Py_XDECREF on PyUnicodeobject raises SIGSEGV signal
type: crash
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36938>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to