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/streams/bug64433.phpt ('Bug #60180 ($_SERVER["PHP_SELF"] incorrect)')

Script

1: <?php
2:
include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc";
3:
php_cli_server_start(file_get_contents(__DIR__.'/bug64433_srv.inc'));
4:
5: echo 
file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php");
6: echo 
"default\n";
7:
$codes = array(200201204301302303304305307404500);
8: foreach(
$codes as $code) {
9:     echo 
"$code: ".file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php?status=$code&loc=1");
10: }
11: echo 
"follow=0\n";
12:
$arr = array('http'=>
13:                         array(
14:                                 
'follow_location'=>0,
15:                         )
16:                 );
17:
$context stream_context_create($arr);
18: foreach(
$codes as $code) {
19:     echo 
"$code: ".file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php?status=$code&loc=1"false$context);
20: }
21: echo 
"follow=1\n";
22:
$arr = array('http'=>
23:                         array(
24:                                 
'follow_location'=>1,
25:                         )
26:                 );
27:
$context stream_context_create($arr);
28: foreach(
$codes as $code) {
29:     echo 
"$code: ".file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php?status=$code&loc=1"false$context);
30: }
31:

Report

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

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

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