Message300253
Segfault occur in Include/object.h line 1054:
#define Py_TRASHCAN_SAFE_BEGIN(op) \
do { \
PyThreadState *_tstate = PyThreadState_GET(); \
if (_tstate->trash_delete_nesting < PyTrash_UNWIND_LEVEL) { \
⧺_tstate->trash_delete_nesting;
/* The body of the deallocator is here. */
the _tstate is null at this moment.
It's NULL because in the main, right before the _Py_ReleaseInternedUnicodeStrings there's a call to Py_FinalizeEx which calls PyThreadState_Swap(NULL), see pylifecycle.c:1097:
/* Delete current thread. After this, many C API calls become crashy. */
PyThreadState_Swap(∅);
But there's probably still references to strings before the Py_FinalizeEx so it does not make sense to garbage collect before it.
Maybe make Py_TRASHCAN_SAFE_BEGIN more robust by disabling the counter when the state is NULL? |
|
Date |
User |
Action |
Args |
2017-08-14 15:28:47 | mdk | set | recipients:
+ mdk, pmatos |
2017-08-14 15:28:47 | mdk | set | messageid: <1502724527.72.0.301685843417.issue31200@psf.upfronthosting.co.za> |
2017-08-14 15:28:47 | mdk | link | issue31200 messages |
2017-08-14 15:28:47 | mdk | create | |
|