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

==25258== Syscall param socketcall.bind(my_addr.sin6_flowinfo) points to uninitialised byte(s)
==25258==    at 0xDA6C847: bind (in /lib64/libc-2.12.so)
==25258==    by 0xE3B1ED: php_network_connect_socket_to_host (network.c:877)
==25258==    by 0xE6784F: php_tcp_sockop_connect (xp_socket.c:769)
==25258==    by 0xE67DB1: php_tcp_sockop_set_option (xp_socket.c:856)
==25258==    by 0x519F53: php_openssl_sockop_set_option (xp_ssl.c:2535)
==25258==    by 0xE498E9: _php_stream_set_option (streams.c:1321)
==25258==    by 0xE63D52: php_stream_xport_connect (transports.c:237)
==25258==    by 0xE631C3: _php_stream_xport_create (transports.c:143)
==25258==    by 0xD50232: zif_stream_socket_client (streamsfuncs.c:139)
==25258==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==25258==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==25258==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==25258==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==25258==  Address 0x158de664 is 4 bytes inside a block of size 32 alloc'd
==25258==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==25258==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==25258==    by 0xEB2637: _emalloc_32 (zend_alloc.c:2454)
==25258==    by 0xE3B0F8: php_network_connect_socket_to_host (network.c:863)
==25258==    by 0xE6784F: php_tcp_sockop_connect (xp_socket.c:769)
==25258==    by 0xE67DB1: php_tcp_sockop_set_option (xp_socket.c:856)
==25258==    by 0x519F53: php_openssl_sockop_set_option (xp_ssl.c:2535)
==25258==    by 0xE498E9: _php_stream_set_option (streams.c:1321)
==25258==    by 0xE63D52: php_stream_xport_connect (transports.c:237)
==25258==    by 0xE631C3: _php_stream_xport_create (transports.c:143)
==25258==    by 0xD50232: zif_stream_socket_client (streamsfuncs.c:139)
==25258==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==25258==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==25258== 
==25258== Syscall param socketcall.bind(my_addr.sin6_scope_id) points to uninitialised byte(s)
==25258==    at 0xDA6C847: bind (in /lib64/libc-2.12.so)
==25258==    by 0xE3B1ED: php_network_connect_socket_to_host (network.c:877)
==25258==    by 0xE6784F: php_tcp_sockop_connect (xp_socket.c:769)
==25258==    by 0xE67DB1: php_tcp_sockop_set_option (xp_socket.c:856)
==25258==    by 0x519F53: php_openssl_sockop_set_option (xp_ssl.c:2535)
==25258==    by 0xE498E9: _php_stream_set_option (streams.c:1321)
==25258==    by 0xE63D52: php_stream_xport_connect (transports.c:237)
==25258==    by 0xE631C3: _php_stream_xport_create (transports.c:143)
==25258==    by 0xD50232: zif_stream_socket_client (streamsfuncs.c:139)
==25258==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==25258==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==25258==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==25258==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==25258==  Address 0x158de678 is 24 bytes inside a block of size 32 alloc'd
==25258==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==25258==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==25258==    by 0xEB2637: _emalloc_32 (zend_alloc.c:2454)
==25258==    by 0xE3B0F8: php_network_connect_socket_to_host (network.c:863)
==25258==    by 0xE6784F: php_tcp_sockop_connect (xp_socket.c:769)
==25258==    by 0xE67DB1: php_tcp_sockop_set_option (xp_socket.c:856)
==25258==    by 0x519F53: php_openssl_sockop_set_option (xp_ssl.c:2535)
==25258==    by 0xE498E9: _php_stream_set_option (streams.c:1321)
==25258==    by 0xE63D52: php_stream_xport_connect (transports.c:237)
==25258==    by 0xE631C3: _php_stream_xport_create (transports.c:143)
==25258==    by 0xD50232: zif_stream_socket_client (streamsfuncs.c:139)
==25258==    by 0x116E86B: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:957)
==25258==    by 0x116E86B: execute_ex (zend_vm_execute.h:60373)
==25258== 

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

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