PHP  
 PHP_7_1
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

==3312== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==3312==    at 0xD39A847: bind (in /lib64/libc-2.12.so)
==3312==    by 0xF2B462: php_network_connect_socket_to_host (network.c:898)
==3312==    by 0xF559AA: php_tcp_sockop_connect (xp_socket.c:771)
==3312==    by 0xF55F00: php_tcp_sockop_set_option (xp_socket.c:858)
==3312==    by 0x50673C: php_openssl_sockop_set_option (xp_ssl.c:2396)
==3312==    by 0xF3867A: _php_stream_set_option (streams.c:1350)
==3312==    by 0xF51EC9: php_stream_xport_connect (transports.c:244)
==3312==    by 0xF514F1: _php_stream_xport_create (transports.c:144)
==3312==    by 0xE1535B: zif_stream_socket_client (streamsfuncs.c:132)
==3312==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==3312==    by 0x10F2D8F: execute_ex (zend_vm_execute.h:429)
==3312==    by 0x10F397F: zend_execute (zend_vm_execute.h:474)
==3312==  Address 0x15c877a4 is 4 bytes inside a block of size 32 alloc'd
==3312==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==3312==    by 0xFAB3A1: __zend_malloc (zend_alloc.c:2838)
==3312==    by 0xFA4B5D: _emalloc_32 (zend_alloc.c:2352)
==3312==    by 0xF2B36D: php_network_connect_socket_to_host (network.c:884)
==3312==    by 0xF559AA: php_tcp_sockop_connect (xp_socket.c:771)
==3312==    by 0xF55F00: php_tcp_sockop_set_option (xp_socket.c:858)
==3312==    by 0x50673C: php_openssl_sockop_set_option (xp_ssl.c:2396)
==3312==    by 0xF3867A: _php_stream_set_option (streams.c:1350)
==3312==    by 0xF51EC9: php_stream_xport_connect (transports.c:244)
==3312==    by 0xF514F1: _php_stream_xport_create (transports.c:144)
==3312==    by 0xE1535B: zif_stream_socket_client (streamsfuncs.c:132)
==3312==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==3312== 
==3312== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==3312==    at 0xD39A847: bind (in /lib64/libc-2.12.so)
==3312==    by 0xF2B462: php_network_connect_socket_to_host (network.c:898)
==3312==    by 0xF559AA: php_tcp_sockop_connect (xp_socket.c:771)
==3312==    by 0xF55F00: php_tcp_sockop_set_option (xp_socket.c:858)
==3312==    by 0x50673C: php_openssl_sockop_set_option (xp_ssl.c:2396)
==3312==    by 0xF3867A: _php_stream_set_option (streams.c:1350)
==3312==    by 0xF51EC9: php_stream_xport_connect (transports.c:244)
==3312==    by 0xF514F1: _php_stream_xport_create (transports.c:144)
==3312==    by 0xE1535B: zif_stream_socket_client (streamsfuncs.c:132)
==3312==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==3312==    by 0x10F2D8F: execute_ex (zend_vm_execute.h:429)
==3312==    by 0x10F397F: zend_execute (zend_vm_execute.h:474)
==3312==  Address 0x15c877b8 is 24 bytes inside a block of size 32 alloc'd
==3312==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==3312==    by 0xFAB3A1: __zend_malloc (zend_alloc.c:2838)
==3312==    by 0xFA4B5D: _emalloc_32 (zend_alloc.c:2352)
==3312==    by 0xF2B36D: php_network_connect_socket_to_host (network.c:884)
==3312==    by 0xF559AA: php_tcp_sockop_connect (xp_socket.c:771)
==3312==    by 0xF55F00: php_tcp_sockop_set_option (xp_socket.c:858)
==3312==    by 0x50673C: php_openssl_sockop_set_option (xp_ssl.c:2396)
==3312==    by 0xF3867A: _php_stream_set_option (streams.c:1350)
==3312==    by 0xF51EC9: php_stream_xport_connect (transports.c:244)
==3312==    by 0xF514F1: _php_stream_xport_create (transports.c:144)
==3312==    by 0xE1535B: zif_stream_socket_client (streamsfuncs.c:132)
==3312==    by 0x10F5C34: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:675)
==3312== 

 

Generated at Sun, 23 Feb 2020 16:49:06 +0000 (2 days ago)

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