Commit b3e28e2
committed
Fix module shutdown crash during ZTS JIT shutdown
Commit a211956 fixed a leak by adding a TSRM destructor for the
JIT globals in ZTS mode. In case the main thread shuts down the TSRM, it
will call all the destructors. The JIT globals destructor will be
invoked, but will always access the main thread globals using JIT_G.
This means that instead of freeing the JIT globals in the different
threads, the one in the main thread is freed repeatedly over and over,
crashing PHP. Fix it by always passing the pointer instead of relying on
JIT_G.
Closes GH-10835.1 parent 1015f1f commit b3e28e2
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4762 | 4762 | | |
4763 | 4763 | | |
4764 | 4764 | | |
4765 | | - | |
| 4765 | + | |
4766 | 4766 | | |
4767 | 4767 | | |
4768 | 4768 | | |
| |||
5081 | 5081 | | |
5082 | 5082 | | |
5083 | 5083 | | |
5084 | | - | |
| 5084 | + | |
5085 | 5085 | | |
5086 | 5086 | | |
5087 | 5087 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8324 | 8324 | | |
8325 | 8325 | | |
8326 | 8326 | | |
8327 | | - | |
| 8327 | + | |
8328 | 8328 | | |
8329 | | - | |
8330 | | - | |
| 8329 | + | |
| 8330 | + | |
8331 | 8331 | | |
8332 | 8332 | | |
8333 | 8333 | | |
| |||
0 commit comments