PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for sapi/cli/tests/016.phpt ('CLI -a and readline')

Script

1: <?php
2: $php 
getenv('TEST_PHP_EXECUTABLE');
3:
4:
// disallow console escape sequences that may break the output
5:
putenv('TERM=VT100');
6:
7:
$codes = array();
8:
9:
$codes[1] = <<<EOT
10:
echo 'Hello world';
11: exit
12:
EOT;
13:
14:
$codes[] = <<<EOT
15:
echo 'multine
16: single
17: quote';
18: exit
19:
EOT;
20:
21:
$codes[] = <<<EOT
22:
echo <<<HEREDOC
23: Here
24: comes
25: the
26: doc
27: HEREDOC;
28:
EOT;
29:
30:
$codes[] = <<<EOT
31:
if (0) {
32:     echo "I'm not there";
33: }
34: echo "Done";
35:
EOT;
36:
37:
$codes[] = <<<EOT
38:
function a_function_with_some_name() {
39:     echo "I was called!";
40: }
41: a_function_w    );
42:
EOT;
43:
44: foreach (
$codes as $key => $code) {
45:     echo 
"\n--------------\nSnippet no. $key:\n--------------\n";
46:     
$code escapeshellarg($code);
47:     echo `
echo $code | "$php" -a`, "\n";
48: }
49:
50: echo 
"\nDone\n";
51:
?>
52:

Report

==4779== Syscall param sendmsg(msg.msg_name) points to uninitialised byte(s)
==4779==    at 0xD23BAF0: __sendmsg_nocancel (in /lib64/libc-2.12.so)
==4779==    by 0x5A37BF7: readline (in /lib64/libreadline.so.6.0)
==4779==    by 0xA4F3B0: readline_shell_run (readline_cli.c:610)
==4779==    by 0x102641C: do_cli (php_cli.c:992)
==4779==    by 0x1027BF2: main (php_cli.c:1378)
==4779==  Address 0xffeffef02 is on thread 1's stack
==4779== 
==4779== Syscall param sendmsg(msg.msg_name) points to uninitialised byte(s)
==4779==    at 0xD23BAF0: __sendmsg_nocancel (in /lib64/libc-2.12.so)
==4779==    by 0x5A37BF7: readline (in /lib64/libreadline.so.6.0)
==4779==    by 0xA4F3B0: readline_shell_run (readline_cli.c:610)
==4779==    by 0x102641C: do_cli (php_cli.c:992)
==4779==    by 0x1027BF2: main (php_cli.c:1378)
==4779==  Address 0xffeffef02 is on thread 1's stack
==4779== 

 

Generated at Sat, 12 Apr 2014 09:02:23 +0000 (5 days ago)

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