Repository navigation
Commit 4792857
Fix GH-23617: Keep a past-the-end internal pointer past the end on compaction
zend_array_dup() reset an exhausted internal pointer to 0, and both it and
zend_hash_rehash() left it at the old nNumUsed when holes were compacted, so
a later append was either skipped or the pointer jumped back to the first
element. Move it to the new end instead, the same way past-the-end
iterators are already migrated.
Signed-off-by: Dmitry Rantovov <rantovov5@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Puqi4fj3kWhLHanMyF1UNU1 parent e79d7e5 commit 4792857
2 files changed
Lines changed: 46 additions & 6 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1441 | 1444 | | |
1442 | 1445 | | |
1443 | 1446 | | |
| |||
2445 | 2448 | | |
2446 | 2449 | | |
2447 | 2450 | | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
2448 | 2455 | | |
2449 | 2456 | | |
2450 | 2457 | | |
| |||
2500 | 2507 | | |
2501 | 2508 | | |
2502 | 2509 | | |
2503 | | - | |
2504 | | - | |
2505 | | - | |
| 2510 | + | |
2506 | 2511 | | |
2507 | 2512 | | |
2508 | 2513 | | |
| |||
2516 | 2521 | | |
2517 | 2522 | | |
2518 | 2523 | | |
2519 | | - | |
2520 | | - | |
2521 | | - | |
| 2524 | + | |
2522 | 2525 | | |
2523 | 2526 | | |
2524 | 2527 | | |
| |||
0 commit comments