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

==13959== Jump to the invalid address stated on the next line
==13959==    at 0x4FE: ???
==13959==    by 0x1F00000000: ???
==13959==    by 0x4003A08: dl_main (in /lib64/ld-2.12.so)
==13959==    by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==13959==    by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==13959==    by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==13959==    by 0x6: ???
==13959==    by 0x1FFF000746: ???
==13959==    by 0x1FFF00076A: ???
==13959==    by 0x1FFF00076D: ???
==13959==    by 0x1FFF000793: ???
==13959==    by 0x1FFF000796: ???
==13959==  Address 0x4fe is not stack'd, malloc'd or (recently) free'd
==13959== 
==13959== 
==13959== Process terminating with default action of signal 11 (SIGSEGV)
==13959==  Bad permissions for mapped region at address 0x4FE
==13959==    at 0x4FE: ???
==13959==    by 0x1F00000000: ???
==13959==    by 0x4003A08: dl_main (in /lib64/ld-2.12.so)
==13959==    by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==13959==    by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==13959==    by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==13959==    by 0x6: ???
==13959==    by 0x1FFF000746: ???
==13959==    by 0x1FFF00076A: ???
==13959==    by 0x1FFF00076D: ???
==13959==    by 0x1FFF000793: ???
==13959==    by 0x1FFF000796: ???

 

Generated at Sun, 24 Sep 2017 15:32:56 +0000 (39 hours ago)

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