[php-src] PR #22054: Zend: Fix SIZEOF_POINTER_TYPE warnings in zend_observer.c
| From: | crystarm | Date: | Fri, 15 May 2026 16:16:52 +0000 |
| Subject: | [php-src] PR #22054: Zend: Fix SIZEOF_POINTER_TYPE warnings in zend_observer.c | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36131@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22054
Author: crystarm
This PR fixes two
SIZEOF_POINTER_TYPE static analysis warnings in
Zend/zend_observer.c.
- In zend_observer_remove_handler(), the memmove() size argument now uses
sizeof(void *) instead of sizeof(cur_handler).
- In zend_observer_add_end_handler(), the memmove() size argument now uses
sizeof(zend_observer_fcall_end_handler) instead of sizeof(end_handler).
This makes the byte count explicitly based on the moved element type rather than the pointer
variable type.
No functional behavior change is intended.
Static analyzer findings addressed:
[SIZEOF_POINTER_TYPE
zend_observer.c:[160:6].log](https://github.com/user-attachments/files/27808349/SIZEOF_POINTER_TYPE.zend_observer.c.160.6.log)
[SIZEOF_POINTER_TYPE
zend_observer.c:[198:3].log](https://github.com/user-attachments/files/27808350/SIZEOF_POINTER_TYPE.zend_observer.c.198.3.log)