Valgrind Report for sapi/cli/tests/php_cli_server_012.phpt ('Bug #60159 (Router returns false, but POST is not passed to requested resource)')
Script
1:
<?php 2: include "php_cli_server.inc"; 3: php_cli_server_start('print_r($_REQUEST); $_REQUEST["foo"] = "bar"; return FALSE;'); 4: $doc_root = __DIR__; 5: file_put_contents($doc_root . '/request.php', '<?php print_r($_REQUEST); ?>'); 6: 7: list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); 8: $port = intval($port)?:80; 9: 10: $fp = fsockopen($host, $port, $errno, $errstr, 0.5); 11: if (!$fp) { 12: die("connect failed"); 13: } 14: 15: if(fwrite($fp, <<<HEADER 16: POST /request.php HTTP/1.1 17: Host: {$host} 18: Content-Type: application/x-www-form-urlencoded 19: Content-Length: 3 20: 21: a=b 22: HEADER 23: )) { 24: while (!feof($fp)) { 25: echo fgets($fp); 26: } 27: } 28: 29: fclose($fp); 30: @unlink($doc_root . '/request.php'); 31: 32: ?> 33:
Report
==23224== Jump to the invalid address stated on the next line
==23224== at 0x4FE: ???
==23224== by 0x40056AF: open_verify (in /lib64/ld-2.12.so)
==23224== by 0x4005D5A: open_path (in /lib64/ld-2.12.so)
==23224== by 0x4008973: _dl_map_object (in /lib64/ld-2.12.so)
==23224== by 0x400C701: openaux (in /lib64/ld-2.12.so)
==23224== by 0x400E5E8: _dl_catch_error (in /lib64/ld-2.12.so)
==23224== by 0x400CDE4: _dl_map_object_deps (in /lib64/ld-2.12.so)
==23224== by 0x40034C7: dl_main (in /lib64/ld-2.12.so)
==23224== by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==23224== by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==23224== by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==23224== by 0x6: ???
==23224== Address 0x4fe is not stack'd, malloc'd or (recently) free'd
==23224==
==23224==
==23224== Process terminating with default action of signal 11 (SIGSEGV)
==23224== Bad permissions for mapped region at address 0x4FE
==23224== at 0x4FE: ???
==23224== by 0x40056AF: open_verify (in /lib64/ld-2.12.so)
==23224== by 0x4005D5A: open_path (in /lib64/ld-2.12.so)
==23224== by 0x4008973: _dl_map_object (in /lib64/ld-2.12.so)
==23224== by 0x400C701: openaux (in /lib64/ld-2.12.so)
==23224== by 0x400E5E8: _dl_catch_error (in /lib64/ld-2.12.so)
==23224== by 0x400CDE4: _dl_map_object_deps (in /lib64/ld-2.12.so)
==23224== by 0x40034C7: dl_main (in /lib64/ld-2.12.so)
==23224== by 0x401640D: _dl_sysdep_start (in /lib64/ld-2.12.so)
==23224== by 0x40014D3: _dl_start (in /lib64/ld-2.12.so)
==23224== by 0x4000B37: ??? (in /lib64/ld-2.12.so)
==23224== by 0x6: ???
Generated at Sun, 10 Feb 2019 05:24:25 +0000 (10 days ago)
|