| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| PyDict_Clear(interned); | ||
| Py_DECREF(interned); | ||
| _Py_INTERP_CACHED_OBJECT(interp, interned_strings) = NULL; | ||
| } |
There was a problem hiding this comment.
If I understand the crash report correctly, the problem is that the interned dict is cleared for sub-interpreters when it is also shared between the main interpreter and sub-interpreters. This change means that PyDict_Clear() is never called, not even for the main interpreter. That seems like it will just leak everything in the dict.
I imagine, rather, that you'd put this code inside the block below that is guarded by the _Py_IsMainInterpreter() checl.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the review! Sorry, I put this PR too earlier, after some research I found that I was wrong, and the crash is caused by other place.
For now I can ensure that this line
Line 1973 in 34f5ae6
I guess maybe this unicode object is created in another interpreter, and intern it in the main interpreter will cause the error. But I'm not familiar with these code, and still working on it.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
After #107272, all the sub-interpreters shares the same interned string dict from the main interpreter, but the unicode module's desctructor function for every interpreter will try to free the interned string dict, and this leads to the process crash. Still working on this.