|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79924 compile warnings with --disable-ipv6 --enable-sockets
Submitted: 2020-08-02 14:40 UTC Modified: 2020-08-02 21:04 UTC
From: santi at mola dot io Assigned:
Status: Closed Package: Compile Warning
PHP Version: Supported versions OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: santi at mola dot io
New email:
PHP Version: OS:


 [2020-08-02 14:40 UTC] santi at mola dot io
multiple compile warnings with --disable-ipv6 --enable-sockets.

Marked version PHP 8, but some warnings are probably present in most previous releases too.

Test script:
set -ex
make clean || true
./buildconf -f
./configure --disable-all --disable-phpdbg --disable-ipv6 --enable-sockets --enable-werror
make -j $(nproc)

Actual result:
      |             ^~~~~~~~~~~~~~~~~~~~~~~
/__w/php-src/php-src/ext/sockets/conversions.c:505:13: error: 'to_zval_read_uint32' defined but not used [-Werror=unused-function]
  505 | static void to_zval_read_uint32(const char *data, zval *zv, res_context *ctx)
      |             ^~~~~~~~~~~~~~~~~~~
/__w/php-src/php-src/ext/sockets/conversions.c:491:13: error: 'to_zval_read_unsigned' defined but not used [-Werror=unused-function]
  491 | static void to_zval_read_unsigned(const char *data, zval *zv, res_context *ctx)
      |             ^~~~~~~~~~~~~~~~~~~~~
/bin/bash /__w/php-src/php-src/libtool --silent --preserve-dup-deps --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/sockets/ -I/__w/php-src/php-src/ext/sockets/ -DPHP_ATOM_INC -I/__w/php-src/php-src/include -I/__w/php-src/php-src/main -I/__w/php-src/php-src -I/__w/php-src/php-src/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/usr/include/enchant -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libpng16 -I/usr/include/freetype2 -I/__w/php-src/php-src/ext/mbstring/libmbfl -I/__w/php-src/php-src/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/usr/include/pspell -I/usr/include/tidy -I/__w/php-src/php-src/TSRM -I/__w/php-src/php-src/Zend    -I/usr/include -g -O2 -fvisibility=hidden -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare -Wno-clobbered -DZEND_SIGNALS -Werror   -c /__w/php-src/php-src/ext/sockets/sockaddr_conv.c -o ext/sockets/sockaddr_conv.lo 
/__w/php-src/php-src/ext/sockets/conversions.c: In function 'from_zval_write_controllen':
/__w/php-src/php-src/ext/sockets/conversions.c:1116:24: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1116 |  msghdr->msg_control = accounted_emalloc(len, ctx);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:1685: ext/sockets/conversions.lo] Error 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-02 21:04 UTC]
-Status: Open +Status: Verified -Operating System: Linux +Operating System: -PHP Version: 8.0.0alpha3 +PHP Version: Supported versions
 [2020-08-02 21:04 UTC]
With the provided `Test script`, it's confirmed that this happens in PHP 7.3 and PHP 7.4 as well.

These functions should be moved under a flag check for IPV6 (
 [2020-08-03 12:57 UTC]
Automatic comment on behalf of
Log: Fix bug #79924
 [2020-08-03 12:57 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC