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

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

 

Generated at Fri, 15 Dec 2017 07:20:55 +0000 (37 hours ago)

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