Source: php-wmerrors Version: 2.1.0-1 Severity: important Tags: ftbfs patch upstream Control: block 1149581 by -1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, php-wmerrors fails to build with PHP 8.6, which is in experimental and becomes the default in unstable with the php8.6 transition (#1149581): wmerrors.c: In function 'wmerrors_get_concise_backtrace': wmerrors.c:233:17: error: implicit declaration of function 'zval_dtor' [-Wimplicit-function-declaration] PHP 8.6 removed the zval_dtor() alias of zval_ptr_dtor_nogc() (see UPGRADING.INTERNALS). wmerrors.c calls it in four places. The attached patch calls zval_ptr_dtor_nogc() instead. zval_dtor() has been a macro for exactly that since PHP 7.3, so nothing changes with the older PHP versions. I did not find a fix upstream: master (39e88b4) still calls zval_dtor() and Gerrit has no change for it. The patch applies to master too; it has not been sent upstream yet. With the patch, in an sbuild chroot with php8.6 8.6.0-3 and php-defaults 108~exp2 from experimental, the package builds, its test passes, and the autopkgtest passes with php8.6-cli. The patched extension also builds and passes its test with PHP 8.2 to 8.5. - -- System Information: Debian Release: 13.8 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.12.117+deb13-amd64 (SMP w/12 CPU threads; PREEMPT) Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEw2Gx4wKVQ+vGJel9g3Kkd++uWcIFAmsKoFJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEMz NjFCMUUzMDI5NTQzRUJDNjI1RTk3RDgzNzJBNDc3RUZBRTU5QzIACgkQg3Kkd++u WcJMRRAAgJFNmS0Hoq4nokN22MVGdvYBpGz8XEg4KE9PX0uXENsczuccZheS7LQI IpyqhVx7LQr4uReldGAI/ol6idL1pAD6e1EcBMTqcCjWdhaWVDcBpXekmyV4g2yB pjjpWANfQ9irvYIrSLARdCvAEdGMicNlyUWO95Bt65ABzfwPL0yVoc1JEBZWi+TQ JbLXcXlW5kgu8QwfFbznhaTjpbwl8mzazrA2KC51mLF94c0JIboBV2wRLtOX4l4k zXOno/DpLougovRcUC6loHYpWzi+eStcuA53wr4bgGY7rN6hh3Lva2c3dUBf17+m eBrGBDBEo5oEVjfupHZNqLsf/w4zkUfRqfL4nJP2z148bnz5/vKJDe1vyjECKjnz STAYCziBDesQYEDZgsNe+NgRBbxd1oCa2iJ/4V7UyiUw64EGqxb/ZP7tuzoHMwyk SCcfdOyayJcedHCsPGdQ8XqlFo4wU5ADDWRzQFUvJ5s6C9JYyk267PJvOu/tKySr qYHBXeAwNeS/VosofjrvtVpBvCDTBxQAaatfwipZdc+ws7q8siEBTupGoRbK5pcs eBrrI4Txmx43Sxf5ahA6K/BxyTKl0l3lZYyXRSOUMOrQ1GToZDJhBcWXHjYsoFdf 3QjJxjlTOIT/5H/JXQQXss9d014YNUjDXspSEIAfONIDAJA1Uyk= =dGNL -----END PGP SIGNATURE-----
Description: Replace zval_dtor() with zval_ptr_dtor_nogc() for PHP 8.6 PHP 8.6 removed the zval_dtor() alias of zval_ptr_dtor_nogc() (UPGRADING.INTERNALS: "The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed. Call zval_ptr_dtor_nogc() directly instead."), so the build fails with: . wmerrors.c:233:17: error: implicit declaration of function 'zval_dtor' . zval_dtor() has been a plain macro alias of zval_ptr_dtor_nogc() since PHP 7.3, so this changes nothing for older PHP versions. Author: Ondřej Surý <[email protected]> Forwarded: no Last-Update: 2026-11-28 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/wmerrors.c +++ b/wmerrors.c @@ -230,7 +230,7 @@ if (Z_TYPE(trace) != IS_ARRAY) { /* Not supposed to happen */ - zval_dtor(&trace); + zval_ptr_dtor_nogc(&trace); return; } @@ -258,7 +258,7 @@ zend_string_free(basename); } ZEND_HASH_FOREACH_END(); - zval_dtor(&trace); + zval_ptr_dtor_nogc(&trace); } static php_stream * wmerrors_open_log_file(const char* stream_name) { @@ -415,7 +415,7 @@ status = call_user_function(NULL, &exception, &backtrace_fname, &trace, 0, NULL); - zval_dtor(&backtrace_fname); + zval_ptr_dtor_nogc(&backtrace_fname); zval_ptr_dtor(&exception); if (status != SUCCESS) { return; @@ -426,7 +426,7 @@ smart_string_appendl(s, Z_STRVAL(trace), Z_STRLEN(trace)); smart_string_appends(s, PHP_EOL); - zval_dtor(&trace); + zval_ptr_dtor_nogc(&trace); } /**

