Commit 104103c
Dani Pinyol
fix: crash in atexit
After jl_atexit_hook(0) returns, Python continues destroying objects, calling _pyjl_dealloc.
But Julia's GC subsystem is already torn down, so Base.GC.enable() and lock() crash.
Now we add a flag that's set by a Julia atexit hook (runs before finalizers inside jl_atexit_hook).
When the flag is set, _pyjl_dealloc skips all Julia runtime operations — the process is exiting anyway.1 parent 7d7bf7e commit 104103c
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | | - | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
375 | 378 | | |
376 | 379 | | |
377 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
378 | 384 | | |
379 | 385 | | |
380 | 386 | | |
| |||
0 commit comments