Package: procps
Version: 1:3.3.3-3
Severity: normal

Kernel 3.14.2 with grsecurity

$ vmstat
procs -----------memory---------- ---swap-- -----io-----system------cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo in   cs us sy id wa
Floating point exception

vmstat.c:
        diow = *cpu_iow;
        dstl = *cpu_zzz;
        Div = duse + dsys + didl + diow + dstl; // Div == 0
        divo2 = Div / 2UL;
        printf(format,
               running, blocked,
               unitConvert(kb_swap_used), unitConvert(kb_main_free),
               unitConvert(a_option?kb_inactive:kb_main_buffers),
               unitConvert(a_option?kb_active:kb_main_cached),
               (unsigned)( (*pswpin  * unitConvert(kb_per_page) * hz + divo2) / 
Div ),
               (unsigned)( (*pswpout * unitConvert(kb_per_page) * hz + divo2) / 
Div ),
               (unsigned)( (*pgpgin                * hz + divo2) / Div ),
               (unsigned)( (*pgpgout               * hz + divo2) / Div ),
               (unsigned)( (*intr                  * hz + divo2) / Div ),
               (unsigned)( (*ctxt                  * hz + divo2) / Div ),
               (unsigned)( (100*duse                    + divo2) / Div ),
               (unsigned)( (100*dsys                    + divo2) / Div ),
               (unsigned)( (100*didl                    + divo2) / Div ),
               (unsigned)( (100*diow                    + divo2) / Div )/*,
               (unsigned)( (100*dstl                    + divo2) / Div ) */
        );


$ gdb .libs/vmstat 
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/procps/procps-3.3.3/.libs/vmstat...done.
(gdb) run 
Starting program: /tmp/procps/procps-3.3.3/.libs/vmstat 
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa

Program received signal SIGFPE, Arithmetic exception.
0x00000000004035ca in new_format () at vmstat.c:276
276                    (unsigned)( (100*diow                    + divo2) / Div 
)/*,
(gdb) where
#0  0x00000000004035ca in new_format () at vmstat.c:276
#1  0x0000000000402785 in main (argc=1, argv=0x3e26a8f3c08) at vmstat.c:823
(gdb) print Div
$1 = 0
(gdb) print diow
$2 = 0
(gdb) print divo2
$3 = 0
(gdb) print duse                        
$5 = 0
(gdb) print dsys
$6 = 0
(gdb) print didl
$7 = 0
(gdb) print diow
$8 = 0
(gdb) print dstl
$9 = 0
(gdb) 

Attachment: signature.asc
Description: PGP signature

Reply via email to