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

==13718== Jump to the invalid address stated on the next line
==13718==    at 0x4FE: ???
==13718==  Address 0x4fe is not stack'd, malloc'd or (recently) free'd
==13718== 
==13718== 
==13718== Process terminating with default action of signal 11 (SIGSEGV)
==13718==  Bad permissions for mapped region at address 0x4FE
==13718==    at 0x4FE: ???

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (10 days ago)

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