Valgrind Report for ext/standard/tests/general_functions/proc_nice_basic.phpt ('proc_nice() basic behaviour')
Script
1:
<?php 2: function getNice($id) 3: { 4: $res = shell_exec('ps -p ' . $id .' -o "pid,nice"'); 5: preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches); 6: if (count($matches) > 2) 7: return $matches[2]; 8: else 9: return -1; 10: } 11: $delta = 10; 12: $pid = getmypid(); 13: $niceBefore = getNice($pid); 14: proc_nice($delta); 15: $niceAfter = getNice($pid); 16: var_dump($niceBefore == ($niceAfter - $delta)); 17: ?> 18:
Report
==8912== Conditional jump or move depends on uninitialised value(s)
==8912== at 0x4C2B187: __GI___rawmemchr (mc_replace_strmem.c:1154)
==8912== by 0x52E698F: _IO_str_init_static_internal (in /lib64/libc-2.12.so)
==8912== by 0x52DA934: vsscanf (in /lib64/libc-2.12.so)
==8912== by 0x52D49A7: sscanf (in /lib64/libc-2.12.so)
==8912== by 0x403096: ??? (in /bin/ps)
==8912== by 0x4022A5: ??? (in /bin/ps)
==8912== by 0x528FCDC: (below main) (in /lib64/libc-2.12.so)
==8912==
Generated at Wed, 15 May 2013 22:03:26 +0000 (3 days ago)
|