PHP  
 PHP_7_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/standard/tests/network/bug74764.phpt ('Bug #74764 IPv6 bindto fails with stream_socket_client()')

Script

1: <?php
2: $context 
stream_context_create(
3:     [
'socket' => array('bindto' => "[::]:0")]
4:     );
5:     
$socket stream_socket_client('tcp://localhost:1443'$errno$errstr5STREAM_CLIENT_CONNECT$context);
6:
7:
$context stream_context_create(
8:     array(
'socket' => array('bindto' => "0.0.0.0:0"))
9:     );
10:     
$socket stream_socket_client('tcp://localhost:1443'$errno$errstr5STREAM_CLIENT_CONNECT$context);
11:
?>
12:

Report

==10997== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==10997==    at 0xD58F847: bind (in /lib64/libc-2.12.so)
==10997==    by 0x10A2B98: php_network_connect_socket_to_host (network.c:890)
==10997==    by 0x10CFAF2: php_tcp_sockop_connect (xp_socket.c:775)
==10997==    by 0x10D0054: php_tcp_sockop_set_option (xp_socket.c:862)
==10997==    by 0x51309F: php_openssl_sockop_set_option (xp_ssl.c:2516)
==10997==    by 0x10B154C: _php_stream_set_option (streams.c:1332)
==10997==    by 0x10CBFF5: php_stream_xport_connect (transports.c:237)
==10997==    by 0x10CB466: _php_stream_xport_create (transports.c:143)
==10997==    by 0xF95E72: zif_stream_socket_client (streamsfuncs.c:141)
==10997==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==10997==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==10997==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==10997==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==10997==  Address 0x15d46eb4 is 4 bytes inside a block of size 32 alloc'd
==10997==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10997==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==10997==    by 0x111B4ED: _emalloc_32 (zend_alloc.c:2429)
==10997==    by 0x10A2AA3: php_network_connect_socket_to_host (network.c:876)
==10997==    by 0x10CFAF2: php_tcp_sockop_connect (xp_socket.c:775)
==10997==    by 0x10D0054: php_tcp_sockop_set_option (xp_socket.c:862)
==10997==    by 0x51309F: php_openssl_sockop_set_option (xp_ssl.c:2516)
==10997==    by 0x10B154C: _php_stream_set_option (streams.c:1332)
==10997==    by 0x10CBFF5: php_stream_xport_connect (transports.c:237)
==10997==    by 0x10CB466: _php_stream_xport_create (transports.c:143)
==10997==    by 0xF95E72: zif_stream_socket_client (streamsfuncs.c:141)
==10997==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==10997==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==10997== 
==10997== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==10997==    at 0xD58F847: bind (in /lib64/libc-2.12.so)
==10997==    by 0x10A2B98: php_network_connect_socket_to_host (network.c:890)
==10997==    by 0x10CFAF2: php_tcp_sockop_connect (xp_socket.c:775)
==10997==    by 0x10D0054: php_tcp_sockop_set_option (xp_socket.c:862)
==10997==    by 0x51309F: php_openssl_sockop_set_option (xp_ssl.c:2516)
==10997==    by 0x10B154C: _php_stream_set_option (streams.c:1332)
==10997==    by 0x10CBFF5: php_stream_xport_connect (transports.c:237)
==10997==    by 0x10CB466: _php_stream_xport_create (transports.c:143)
==10997==    by 0xF95E72: zif_stream_socket_client (streamsfuncs.c:141)
==10997==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==10997==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==10997==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==10997==    by 0x11903BE: zend_execute_scripts (zend.c:1568)
==10997==  Address 0x15d46ec8 is 24 bytes inside a block of size 32 alloc'd
==10997==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10997==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==10997==    by 0x111B4ED: _emalloc_32 (zend_alloc.c:2429)
==10997==    by 0x10A2AA3: php_network_connect_socket_to_host (network.c:876)
==10997==    by 0x10CFAF2: php_tcp_sockop_connect (xp_socket.c:775)
==10997==    by 0x10D0054: php_tcp_sockop_set_option (xp_socket.c:862)
==10997==    by 0x51309F: php_openssl_sockop_set_option (xp_ssl.c:2516)
==10997==    by 0x10B154C: _php_stream_set_option (streams.c:1332)
==10997==    by 0x10CBFF5: php_stream_xport_connect (transports.c:237)
==10997==    by 0x10CB466: _php_stream_xport_create (transports.c:143)
==10997==    by 0xF95E72: zif_stream_socket_client (streamsfuncs.c:141)
==10997==    by 0x13AFD89: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:694)
==10997==    by 0x13AFD89: execute_ex (zend_vm_execute.h:55503)
==10997== 

 

Generated at Fri, 03 Dec 2021 18:13:45 +0000 (3 days ago)

Copyright © 2005-2021 The PHP Group
All rights reserved.