PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/openssl/tests/streams_crypto_method.phpt ('Specific crypto method for ssl:// transports.')

Script

1: <?php
2: $serverCode 
= <<<'CODE'
3:
    $serverUri = "ssl://127.0.0.1:64321";
4:     $serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
5:     $serverCtx = stream_context_create(['ssl' => [
6:         'local_cert' => __DIR__ . '/streams_crypto_method.pem',
7:     ]]);
8:
9:     $server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
10:     phpt_notify();
11:
12:     $client = @stream_socket_accept($server);
13:     if ($client) {
14:         $in = '';
15:         while (!preg_match('/\r?\n\r?\n/', $in)) {
16:             $in .= fread($client, 2048);
17:         }
18:         $response = "HTTP/1.0 200 OK\r\n"
19:                   . "Content-Type: text/plain\r\n"
20:                   . "Content-Length: 12\r\n"
21:                   . "Connection: close\r\n"
22:                   . "\r\n"
23:                   . "Hello World!";
24:         fwrite($client, $response);
25:         fclose($client);
26:     }
27:
CODE;
28:
29:
$clientCode = <<<'CODE'
30:
    $serverUri = "https://127.0.0.1:64321/";
31:     $clientFlags = STREAM_CLIENT_CONNECT;
32:     $clientCtx = stream_context_create(['ssl' => [
33:         'crypto_method' => STREAM_CRYPTO_METHOD_SSLv3_CLIENT,
34:         'verify_peer' => false,
35:         'verify_peer_name' => false
36:     ]]);
37:
38:     phpt_wait();
39:     echo file_get_contents($serverUri, false, $clientCtx);
40:
CODE;
41:
42: include 
'ServerClientTestCase.inc';
43:
ServerClientTestCase::getInstance()->run($clientCode$serverCode);
44:

Report

==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0x8AAE6C3: ssl3_read_bytes (in /usr/lib64/libssl.so.1.0.1e)
==27698==    by 0x8AA9EDF: ??? (in /usr/lib64/libssl.so.1.0.1e)
==27698==    by 0x5094DF: php_openssl_sockop_read (xp_ssl.c:1790)
==27698==    by 0xF29B16: php_stream_fill_read_buffer (streams.c:696)
==27698==    by 0xF2A872: _php_stream_get_line (streams.c:979)
==27698==    by 0xDD64CB: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:670)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0x4C29731: memchr (mc_replace_strmem.c:762)
==27698==    by 0xF2A536: php_stream_locate_eol (streams.c:879)
==27698==    by 0xF2A657: _php_stream_get_line (streams.c:926)
==27698==    by 0xDD64CB: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:670)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0x4C29740: memchr (mc_replace_strmem.c:762)
==27698==    by 0xF2A536: php_stream_locate_eol (streams.c:879)
==27698==    by 0xF2A657: _php_stream_get_line (streams.c:926)
==27698==    by 0xDD64CB: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:670)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698== 
==27698== Use of uninitialised value of size 8
==27698==    at 0xA62CED0: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CEF9: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CF01: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CF11: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CF1B: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CF59: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CF86: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CFDF: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62D009: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CFE8: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62CFEE: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Use of uninitialised value of size 8
==27698==    at 0xA62CFC5: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xA62D049: ____strtol_l_internal (in /lib64/libc-2.12.so)
==27698==    by 0xA629C6F: atoi (in /lib64/libc-2.12.so)
==27698==    by 0xDD6518: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:674)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xDD6626: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:688)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698==    by 0x120D3D9: do_cli (php_cli.c:978)
==27698==    by 0x120EE50: main (php_cli.c:1356)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xDD6644: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:688)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698==    by 0x120D3D9: do_cli (php_cli.c:978)
==27698==    by 0x120EE50: main (php_cli.c:1356)
==27698== 
==27698== Conditional jump or move depends on uninitialised value(s)
==27698==    at 0xDD6828: php_stream_url_wrap_http_ex (http_fopen_wrapper.c:707)
==27698==    by 0xDD85E1: php_stream_url_wrap_http (http_fopen_wrapper.c:930)
==27698==    by 0xF2FE85: _php_stream_open_wrapper_ex (streams.c:2069)
==27698==    by 0xCF6AAD: zif_file_get_contents (file.c:547)
==27698==    by 0xA8CA4F: phar_file_get_contents (func_interceptors.c:219)
==27698==    by 0x10A0AAD: ZEND_DO_FCALL_SPEC_HANDLER (zend_vm_execute.h:565)
==27698==    by 0x109E445: execute_ex (zend_vm_execute.h:352)
==27698==    by 0x109F036: zend_execute (zend_vm_execute.h:381)
==27698==    by 0xFFA07C: zend_execute_scripts (zend.c:1266)
==27698==    by 0xEFB14D: php_execute_script (main.c:2563)
==27698==    by 0x120D3D9: do_cli (php_cli.c:978)
==27698==    by 0x120EE50: main (php_cli.c:1356)
==27698== 

 

Generated at Thu, 30 Oct 2014 07:41:47 +0000 (8 hours ago)

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