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

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

==10808== Conditional jump or move depends on uninitialised value(s)
==10808==    at 0x4C2B537: __GI___rawmemchr (mc_replace_strmem.c:1203)
==10808==    by 0x52E6A0F: _IO_str_init_static_internal (in /lib64/libc-2.12.so)
==10808==    by 0x52DA9B4: vsscanf (in /lib64/libc-2.12.so)
==10808==    by 0x52D4A27: sscanf (in /lib64/libc-2.12.so)
==10808==    by 0x403096: ??? (in /bin/ps)
==10808==    by 0x4022A5: ??? (in /bin/ps)
==10808==    by 0x528FD1C: (below main) (in /lib64/libc-2.12.so)
==10808== 

 

Generated at Wed, 23 Jul 2014 19:58:46 +0000 (8 hours ago)

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