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

==8438== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==8438==    at 0xD167847: bind (in /lib64/libc-2.12.so)
==8438==    by 0x103528F: php_network_connect_socket_to_host (network.c:888)
==8438==    by 0x105FA1A: php_tcp_sockop_connect (xp_socket.c:771)
==8438==    by 0x105FF70: php_tcp_sockop_set_option (xp_socket.c:858)
==8438==    by 0x5170AB: php_openssl_sockop_set_option (xp_ssl.c:2466)
==8438==    by 0x10424F8: _php_stream_set_option (streams.c:1318)
==8438==    by 0x105BF1D: php_stream_xport_connect (transports.c:244)
==8438==    by 0x105B545: _php_stream_xport_create (transports.c:144)
==8438==    by 0xF10C83: zif_stream_socket_client (streamsfuncs.c:143)
==8438==    by 0x1375F53: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==8438==    by 0x1375F53: execute_ex (zend_vm_execute.h:59766)
==8438==    by 0x139D565: zend_execute (zend_vm_execute.h:63792)
==8438==    by 0x112147C: zend_execute_scripts (zend.c:1498)
==8438==  Address 0x15b45114 is 4 bytes inside a block of size 32 alloc'd
==8438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==8438==    by 0x10B5904: __zend_malloc (zend_alloc.c:2835)
==8438==    by 0x10AF138: _emalloc_32 (zend_alloc.c:2359)
==8438==    by 0x103519A: php_network_connect_socket_to_host (network.c:874)
==8438==    by 0x105FA1A: php_tcp_sockop_connect (xp_socket.c:771)
==8438==    by 0x105FF70: php_tcp_sockop_set_option (xp_socket.c:858)
==8438==    by 0x5170AB: php_openssl_sockop_set_option (xp_ssl.c:2466)
==8438==    by 0x10424F8: _php_stream_set_option (streams.c:1318)
==8438==    by 0x105BF1D: php_stream_xport_connect (transports.c:244)
==8438==    by 0x105B545: _php_stream_xport_create (transports.c:144)
==8438==    by 0xF10C83: zif_stream_socket_client (streamsfuncs.c:143)
==8438==    by 0x1375F53: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==8438==    by 0x1375F53: execute_ex (zend_vm_execute.h:59766)
==8438== 
==8438== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==8438==    at 0xD167847: bind (in /lib64/libc-2.12.so)
==8438==    by 0x103528F: php_network_connect_socket_to_host (network.c:888)
==8438==    by 0x105FA1A: php_tcp_sockop_connect (xp_socket.c:771)
==8438==    by 0x105FF70: php_tcp_sockop_set_option (xp_socket.c:858)
==8438==    by 0x5170AB: php_openssl_sockop_set_option (xp_ssl.c:2466)
==8438==    by 0x10424F8: _php_stream_set_option (streams.c:1318)
==8438==    by 0x105BF1D: php_stream_xport_connect (transports.c:244)
==8438==    by 0x105B545: _php_stream_xport_create (transports.c:144)
==8438==    by 0xF10C83: zif_stream_socket_client (streamsfuncs.c:143)
==8438==    by 0x1375F53: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==8438==    by 0x1375F53: execute_ex (zend_vm_execute.h:59766)
==8438==    by 0x139D565: zend_execute (zend_vm_execute.h:63792)
==8438==    by 0x112147C: zend_execute_scripts (zend.c:1498)
==8438==  Address 0x15b45128 is 24 bytes inside a block of size 32 alloc'd
==8438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==8438==    by 0x10B5904: __zend_malloc (zend_alloc.c:2835)
==8438==    by 0x10AF138: _emalloc_32 (zend_alloc.c:2359)
==8438==    by 0x103519A: php_network_connect_socket_to_host (network.c:874)
==8438==    by 0x105FA1A: php_tcp_sockop_connect (xp_socket.c:771)
==8438==    by 0x105FF70: php_tcp_sockop_set_option (xp_socket.c:858)
==8438==    by 0x5170AB: php_openssl_sockop_set_option (xp_ssl.c:2466)
==8438==    by 0x10424F8: _php_stream_set_option (streams.c:1318)
==8438==    by 0x105BF1D: php_stream_xport_connect (transports.c:244)
==8438==    by 0x105B545: _php_stream_xport_create (transports.c:144)
==8438==    by 0xF10C83: zif_stream_socket_client (streamsfuncs.c:143)
==8438==    by 0x1375F53: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:621)
==8438==    by 0x1375F53: execute_ex (zend_vm_execute.h:59766)
==8438== 

 

Generated at Thu, 17 Oct 2019 23:21:35 +0000 (2 days ago)

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