Valgrind Report for ext/posix/tests/posix_kill_basic.phpt ('Test posix_kill(), posix_get_last_error and posix_strerror() functions : basic functionality')
Script
1:
<?php 2: echo "Basic test of POSIX getpgid(), kill(), get_last_error() and strerror() functions\n"; 3: 4: // Don't rely on PCNTL extension being around 5: $SIGKILL = 9; 6: 7: // TODO Once we have PS open working beef up this test to create a process and kill it 8: // for now start at a low pid and find first pid which does not exist. 9: $pid = 999; 10: do { 11: $pid += 1; 12: $result = shell_exec("ps -p " . $pid); 13: } while (stripos($result, (string)$pid) != FALSE); 14: 15: echo "Kill pid=" . $pid . "\n"; 16: var_dump(posix_kill($pid,$SIGKILL)); 17: 18: $errno = posix_get_last_error(); 19: 20: var_dump($errno); 21: var_dump(posix_strerror($errno)); 22: 23: ?> 24: ===DONE==== 25:
Report
==19071== Conditional jump or move depends on uninitialised value(s)
==19071== at 0x4C2B187: __GI___rawmemchr (mc_replace_strmem.c:1154)
==19071== by 0x52E698F: _IO_str_init_static_internal (in /lib64/libc-2.12.so)
==19071== by 0x52DA934: vsscanf (in /lib64/libc-2.12.so)
==19071== by 0x52D49A7: sscanf (in /lib64/libc-2.12.so)
==19071== by 0x403096: ??? (in /bin/ps)
==19071== by 0x4022A5: ??? (in /bin/ps)
==19071== by 0x528FCDC: (below main) (in /lib64/libc-2.12.so)
==19071==
Generated at Thu, 23 May 2013 18:18:24 +0000 (35 hours ago)
|