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

==14489== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==14489==    at 0xD168847: bind (in /lib64/libc-2.12.so)
==14489==    by 0x1034340: php_network_connect_socket_to_host (network.c:888)
==14489==    by 0x105EB5D: php_tcp_sockop_connect (xp_socket.c:771)
==14489==    by 0x105F0B3: php_tcp_sockop_set_option (xp_socket.c:858)
==14489==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==14489==    by 0x104163B: _php_stream_set_option (streams.c:1324)
==14489==    by 0x105B060: php_stream_xport_connect (transports.c:244)
==14489==    by 0x105A688: _php_stream_xport_create (transports.c:144)
==14489==    by 0xF0FD3E: zif_stream_socket_client (streamsfuncs.c:143)
==14489==    by 0x1375224: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==14489==    by 0x1375224: execute_ex (zend_vm_execute.h:59778)
==14489==    by 0x139C836: zend_execute (zend_vm_execute.h:63804)
==14489==    by 0x11205BF: zend_execute_scripts (zend.c:1498)
==14489==  Address 0x15b4c114 is 4 bytes inside a block of size 32 alloc'd
==14489==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14489==    by 0x10B4A47: __zend_malloc (zend_alloc.c:2835)
==14489==    by 0x10AE27B: _emalloc_32 (zend_alloc.c:2359)
==14489==    by 0x103424B: php_network_connect_socket_to_host (network.c:874)
==14489==    by 0x105EB5D: php_tcp_sockop_connect (xp_socket.c:771)
==14489==    by 0x105F0B3: php_tcp_sockop_set_option (xp_socket.c:858)
==14489==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==14489==    by 0x104163B: _php_stream_set_option (streams.c:1324)
==14489==    by 0x105B060: php_stream_xport_connect (transports.c:244)
==14489==    by 0x105A688: _php_stream_xport_create (transports.c:144)
==14489==    by 0xF0FD3E: zif_stream_socket_client (streamsfuncs.c:143)
==14489==    by 0x1375224: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==14489==    by 0x1375224: execute_ex (zend_vm_execute.h:59778)
==14489== 
==14489== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==14489==    at 0xD168847: bind (in /lib64/libc-2.12.so)
==14489==    by 0x1034340: php_network_connect_socket_to_host (network.c:888)
==14489==    by 0x105EB5D: php_tcp_sockop_connect (xp_socket.c:771)
==14489==    by 0x105F0B3: php_tcp_sockop_set_option (xp_socket.c:858)
==14489==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==14489==    by 0x104163B: _php_stream_set_option (streams.c:1324)
==14489==    by 0x105B060: php_stream_xport_connect (transports.c:244)
==14489==    by 0x105A688: _php_stream_xport_create (transports.c:144)
==14489==    by 0xF0FD3E: zif_stream_socket_client (streamsfuncs.c:143)
==14489==    by 0x1375224: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==14489==    by 0x1375224: execute_ex (zend_vm_execute.h:59778)
==14489==    by 0x139C836: zend_execute (zend_vm_execute.h:63804)
==14489==    by 0x11205BF: zend_execute_scripts (zend.c:1498)
==14489==  Address 0x15b4c128 is 24 bytes inside a block of size 32 alloc'd
==14489==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14489==    by 0x10B4A47: __zend_malloc (zend_alloc.c:2835)
==14489==    by 0x10AE27B: _emalloc_32 (zend_alloc.c:2359)
==14489==    by 0x103424B: php_network_connect_socket_to_host (network.c:874)
==14489==    by 0x105EB5D: php_tcp_sockop_connect (xp_socket.c:771)
==14489==    by 0x105F0B3: php_tcp_sockop_set_option (xp_socket.c:858)
==14489==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==14489==    by 0x104163B: _php_stream_set_option (streams.c:1324)
==14489==    by 0x105B060: php_stream_xport_connect (transports.c:244)
==14489==    by 0x105A688: _php_stream_xport_create (transports.c:144)
==14489==    by 0xF0FD3E: zif_stream_socket_client (streamsfuncs.c:143)
==14489==    by 0x1375224: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==14489==    by 0x1375224: execute_ex (zend_vm_execute.h:59778)
==14489== 

 

Generated at Fri, 22 May 2020 15:51:44 +0000 (2 days ago)

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