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

==575== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==575==    at 0xD168847: bind (in /lib64/libc-2.12.so)
==575==    by 0x10343F8: php_network_connect_socket_to_host (network.c:888)
==575==    by 0x105EC15: php_tcp_sockop_connect (xp_socket.c:771)
==575==    by 0x105F16B: php_tcp_sockop_set_option (xp_socket.c:858)
==575==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==575==    by 0x10416F3: _php_stream_set_option (streams.c:1324)
==575==    by 0x105B118: php_stream_xport_connect (transports.c:244)
==575==    by 0x105A740: _php_stream_xport_create (transports.c:144)
==575==    by 0xF0FDC0: zif_stream_socket_client (streamsfuncs.c:143)
==575==    by 0x13752DC: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==575==    by 0x13752DC: execute_ex (zend_vm_execute.h:59778)
==575==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==575==    by 0x1120677: zend_execute_scripts (zend.c:1498)
==575==  Address 0x15b4c114 is 4 bytes inside a block of size 32 alloc'd
==575==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==575==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==575==    by 0x10AE333: _emalloc_32 (zend_alloc.c:2359)
==575==    by 0x1034303: php_network_connect_socket_to_host (network.c:874)
==575==    by 0x105EC15: php_tcp_sockop_connect (xp_socket.c:771)
==575==    by 0x105F16B: php_tcp_sockop_set_option (xp_socket.c:858)
==575==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==575==    by 0x10416F3: _php_stream_set_option (streams.c:1324)
==575==    by 0x105B118: php_stream_xport_connect (transports.c:244)
==575==    by 0x105A740: _php_stream_xport_create (transports.c:144)
==575==    by 0xF0FDC0: zif_stream_socket_client (streamsfuncs.c:143)
==575==    by 0x13752DC: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==575==    by 0x13752DC: execute_ex (zend_vm_execute.h:59778)
==575== 
==575== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==575==    at 0xD168847: bind (in /lib64/libc-2.12.so)
==575==    by 0x10343F8: php_network_connect_socket_to_host (network.c:888)
==575==    by 0x105EC15: php_tcp_sockop_connect (xp_socket.c:771)
==575==    by 0x105F16B: php_tcp_sockop_set_option (xp_socket.c:858)
==575==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==575==    by 0x10416F3: _php_stream_set_option (streams.c:1324)
==575==    by 0x105B118: php_stream_xport_connect (transports.c:244)
==575==    by 0x105A740: _php_stream_xport_create (transports.c:144)
==575==    by 0xF0FDC0: zif_stream_socket_client (streamsfuncs.c:143)
==575==    by 0x13752DC: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==575==    by 0x13752DC: execute_ex (zend_vm_execute.h:59778)
==575==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==575==    by 0x1120677: zend_execute_scripts (zend.c:1498)
==575==  Address 0x15b4c128 is 24 bytes inside a block of size 32 alloc'd
==575==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==575==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==575==    by 0x10AE333: _emalloc_32 (zend_alloc.c:2359)
==575==    by 0x1034303: php_network_connect_socket_to_host (network.c:874)
==575==    by 0x105EC15: php_tcp_sockop_connect (xp_socket.c:771)
==575==    by 0x105F16B: php_tcp_sockop_set_option (xp_socket.c:858)
==575==    by 0x51719C: php_openssl_sockop_set_option (xp_ssl.c:2468)
==575==    by 0x10416F3: _php_stream_set_option (streams.c:1324)
==575==    by 0x105B118: php_stream_xport_connect (transports.c:244)
==575==    by 0x105A740: _php_stream_xport_create (transports.c:144)
==575==    by 0xF0FDC0: zif_stream_socket_client (streamsfuncs.c:143)
==575==    by 0x13752DC: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==575==    by 0x13752DC: execute_ex (zend_vm_execute.h:59778)
==575== 

 

Generated at Fri, 16 Oct 2020 02:28:14 +0000 (5 days ago)

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