[GIT-PULLS] [php-src] PR #22756: Fix phpdbg over-read watching an element of a packed array
[email protected] (iliaal) Wed, 15 Jul 2026 21:09:03 +0000
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <[email protected]> |
Pull Request: https://github.com/php/php-src/pull/22756 Author: iliaal Packed arrays store bare zvals, but phpdbg watches every array element as a `Bucket` and reads `Bucket.h`/`.key` in its relocation check, over-reading the neighbouring element. A sibling write then fires a phantom watchpoint, which crashed on 32-bit Windows (`WINDOWS_X86_NTS` in the nightly) once GH-22480 un-xfailed `watch_006`. For a packed parent, relocation is now detected by re-resolving the element and only the zval value is compared. Note: `watch_005` still carries a `PHP_INT_SIZE == 4` xfail with the same "flaws in the implementation of watchpoints" wording, but on a different path (string/reference indirection, not packed buckets). It likely hides a related but distinct 32-bit flaw masked by that skip; this change does not touch it, so it stays skipped.