Commit af2a409
committed
Fix GH-20112: Fatal error during autoloading of complex inheritance chain
When load_delayed_classes() is called recursively (e.g., autoloading a
class whose linking triggers another class with unresolved variance), the
shared delayed_autoloads table may contain entries from an outer caller
whose dependencies are not yet available. The inner call would attempt to
load these unrelated entries, causing a fatal error when their parent
class is still mid-linking higher up the call stack.
In nested calls, catch such loading failures and re-append the entry for
the outer caller to process later, when the dependency chain is complete.
A consecutive-failure counter ensures no infinite retry loops.
Closes GH-201121 parent b97dd33 commit af2a409
4 files changed
Lines changed: 78 additions & 6 deletions
File tree
- Zend
- tests/type_declarations/variance
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3275 | 3275 | | |
3276 | 3276 | | |
3277 | 3277 | | |
3278 | | - | |
3279 | | - | |
3280 | | - | |
3281 | | - | |
3282 | | - | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
3283 | 3291 | | |
3284 | 3292 | | |
3285 | 3293 | | |
| |||
3288 | 3296 | | |
3289 | 3297 | | |
3290 | 3298 | | |
3291 | | - | |
3292 | 3299 | | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
3293 | 3319 | | |
3294 | 3320 | | |
3295 | 3321 | | |
3296 | 3322 | | |
| 3323 | + | |
| 3324 | + | |
3297 | 3325 | | |
| 3326 | + | |
3298 | 3327 | | |
3299 | 3328 | | |
3300 | 3329 | | |
| |||
0 commit comments