Commit 8e3c0c1
committed
Fix GH-16957: Assertion failure in array_shift with self-referencing array
We have an RC1 violation because we're immediately dereferencing and
copying the resulting array in the test case. Instead, transfer the
lifetime using ZVAL_COPY_VALUE and unwrap only after the internal
iterator is reset.1 parent 3c3ec0e commit 8e3c0c1
2 files changed
+49
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3513 | 3513 | | |
3514 | 3514 | | |
3515 | 3515 | | |
3516 | | - | |
| 3516 | + | |
| 3517 | + | |
3517 | 3518 | | |
3518 | 3519 | | |
3519 | 3520 | | |
| |||
3567 | 3568 | | |
3568 | 3569 | | |
3569 | 3570 | | |
3570 | | - | |
| 3571 | + | |
| 3572 | + | |
3571 | 3573 | | |
3572 | 3574 | | |
3573 | 3575 | | |
| |||
3591 | 3593 | | |
3592 | 3594 | | |
3593 | 3595 | | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
3594 | 3600 | | |
3595 | 3601 | | |
3596 | 3602 | | |
| |||
| 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 | + | |
0 commit comments