-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit 1c18267
Destroy temporary module classes in reverse order
We destroy classes of dl()'ed modules in clean_module_classes(), during
shutdown. Child classes of a module use structures of the parent class (such as
inherited properties), which are destroyed earlier, so we have a use-after-free
when destroying a child class.
Here I destroy classes in reverse order, as it is done in zend_shutdown() for
persistent classes.
Fixes GH-17961
Fixes GH-15367 1 parent a7d2703 commit 1c18267
File tree
5 files changed
+97
-14
lines changed- Zend
- ext/dl_test
5 files changed
+97
-14
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
5 | 11 |
| |
6 | 12 |
| |
7 | 13 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | + | ||
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
| |||
3111 | 3112 |
| |
3112 | 3113 |
| |
3113 | 3114 |
| |
3114 | - | ||
3115 | - | ||
3116 | - | ||
3117 | - | ||
3118 | - | ||
3119 | - | ||
3120 | - | ||
3121 | - | ||
3122 | - | ||
3123 | - | ||
3124 | - | ||
3125 | - | ||
3126 | 3115 |
| |
3127 | 3116 |
| |
3128 | - | ||
3117 | + | ||
3118 | + | ||
3119 | + | ||
3120 | + | ||
3121 | + | ||
3122 | + | ||
3123 | + | ||
3124 | + | ||
3125 | + | ||
3129 | 3126 |
| |
3130 | 3127 |
| |
3131 | 3128 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 | + | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
95 | 102 |
| |
96 | 103 |
| |
97 | 104 |
| |
105 | + | ||
106 | + | ||
98 | 107 |
| |
108 | + | ||
109 | + | ||
110 | + | ||
99 | 111 |
| |
100 | 112 |
| |
101 | 113 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments