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

==14428== Syscall param sendmsg(msg.msg_name) points to uninitialised byte(s)
==14428==    at 0xD23DAE0: __sendmsg_nocancel (in /lib64/libc-2.12.so)
==14428==    by 0x5A37BF7: readline (in /lib64/libreadline.so.6.0)
==14428==    by 0xA527F9: readline_shell_run (readline_cli.c:614)
==14428==    by 0x102AA30: do_cli (php_cli.c:992)
==14428==    by 0x102C206: main (php_cli.c:1378)
==14428==  Address 0xffeffef02 is on thread 1's stack
==14428== 

 

Generated at Tue, 26 Aug 2014 07:13:55 +0000 (7 days ago)

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