Ticket #216 (closed defect: fixed)
Exceptions in __Pyx_InitGlobals() lead to a crash
| Reported by: | scoder | Owned by: | robertwb |
|---|---|---|---|
| Priority: | major | Milestone: | 0.11.3 |
| Component: | Code Generation | Keywords: | |
| Cc: |
Description
When an exception is raised in __Pyx_InitGlobals(), __pyx_m is not yet initialised, so this line in __Pyx_AddTraceback() crashes:
py_globals = PyModule_GetDict(__pyx_m);
The same applies to the creation of __pyx_empty_tuple.
A fix might be to move __Pyx_InitGlobals() and friends after the module object creation, or to provide a separate error label for early errors.
BTW, I wonder if __pyx_m leaks in case of an error.
Change History
Note: See
TracTickets for help on using
tickets.
