-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unicodeobject can coredump on exit #36241
Comments
It looks like the internal unicode_empty object can be /* Convert to Unicode */
if (len == 0) {
*** if (unicode_empty == NULL) goto onError;
Py_INCREF(unicode_empty);
v = (PyObject *)unicode_empty;
}
else
v = PyUnicode_Decode(s, len, encoding, errors); The line marked *** was added. It prevents python from |
Logged In: YES Provided you only use Unicode objects with the If you are seeing a core dump in the location In any case, I'd need an example to be able to say |
Logged In: YES Running python 2.1.1 against ZSI, for example test/t3.py segfaults on exit with the following as top of stack. #23 0x0808a0e4 in PyDict_New () at eval.c:41
#24 0x0808a3b6 in PyDict_SetItem () at eval.c:41
#25 0x0808bfc4 in _PyModule_Clear () at eval.c:41
#26 0x080654d6 in PyImport_Cleanup () at eval.c:41
#27 0x0806ae72 in Py_Finalize () at eval.c:41
#28 0x08051fae in Py_Main () at eval.c:41
#29 0x40080507 in __libc_start_main (main=0x8051a20 <main>, argc=2,
ubp_av=0xbffff9c4, init=0x8050e7c <_init>, fini=0x809f070 <_fini>,
rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffff9bc)
at ../sysdeps/generic/libc-start.c:129
(gdb) |
Logged In: YES Notice that unicode_empty is accessed from within I believe PyUnicode_Fini should be run *much* later, e.g. |
Logged In: YES The original report described a test case; test/t3.py in the |
Logged In: YES Moving PyUnicode_Fini down in the finalization list Still, I'm afraid that if some Unicode objects are left Anyway, the test case works now after checkin |
Logged In: YES So, do we want this in 221? I know you may have said in a |
Logged In: YES It's not a critical bug that is being fixed (a crash is OTOH, the fix seems reasonably straight-forward, and low |
Logged In: YES I marked it as "2.2.1 candidate" group. IMHO, this should |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: