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

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

 

Generated at Fri, 01 Dec 2017 18:56:15 +0000 (12 days ago)

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