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/url/get_headers_error_003.phpt ('Test get_headers() function : test with context')

Script

1: <?php
2:
3:
include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc";
4:
php_cli_server_start('header("X-Request-Method: ".$_SERVER["REQUEST_METHOD"]);');
5:
6:
$opts = array(
7:   
'http' => array(
8:     
'method' => 'HEAD'
9:   
)
10: );
11:
12:
$context stream_context_create($opts);
13:
$headers get_headers("http://".PHP_CLI_SERVER_ADDRESS1$context);
14: echo 
$headers["X-Request-Method"]."\n";
15:
16:
stream_context_set_default($opts);
17:
$headers get_headers("http://".PHP_CLI_SERVER_ADDRESS1);
18: echo 
$headers["X-Request-Method"]."\n";
19:
20: echo 
"Done";
21:
?>
22:

Report

==21446== Jump to the invalid address stated on the next line
==21446==    at 0x4FE: ???
==21446==    by 0x40056AF: open_verify (in /lib64/ld-2.12.so)
==21446==    by 0x4005D5A: open_path (in /lib64/ld-2.12.so)
==21446==    by 0x4008973: _dl_map_object (in /lib64/ld-2.12.so)
==21446==    by 0x400C701: openaux (in /lib64/ld-2.12.so)
==21446==    by 0x400E5E8: _dl_catch_error (in /lib64/ld-2.12.so)
==21446==    by 0x400CDE4: _dl_map_object_deps (in /lib64/ld-2.12.so)
==21446==    by 0x40034C7: dl_main (in /lib64/ld-2.12.so)
==21446==    by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==21446==    by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==21446==    by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==21446==    by 0x6: ???
==21446==  Address 0x4fe is not stack'd, malloc'd or (recently) free'd
==21446== 
==21446== 
==21446== Process terminating with default action of signal 11 (SIGSEGV)
==21446==  Bad permissions for mapped region at address 0x4FE
==21446==    at 0x4FE: ???
==21446==    by 0x40056AF: open_verify (in /lib64/ld-2.12.so)
==21446==    by 0x4005D5A: open_path (in /lib64/ld-2.12.so)
==21446==    by 0x4008973: _dl_map_object (in /lib64/ld-2.12.so)
==21446==    by 0x400C701: openaux (in /lib64/ld-2.12.so)
==21446==    by 0x400E5E8: _dl_catch_error (in /lib64/ld-2.12.so)
==21446==    by 0x400CDE4: _dl_map_object_deps (in /lib64/ld-2.12.so)
==21446==    by 0x40034C7: dl_main (in /lib64/ld-2.12.so)
==21446==    by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==21446==    by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==21446==    by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==21446==    by 0x6: ???

 

Generated at Sat, 15 Sep 2018 00:36:54 +0000 (9 days ago)

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