[Bug 206758] [PATCH] Uninitalized variable in atrun

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 30 13:10:33 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206758

            Bug ID: 206758
           Summary: [PATCH] Uninitalized variable in atrun
           Product: Base System
           Version: 10.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: public2016 at hauptsignal.at
                CC: freebsd-amd64 at FreeBSD.org
                CC: freebsd-amd64 at FreeBSD.org
          Keywords: patch

Created attachment 166300
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=166300&action=edit
Patch for the atrun source

The atrun utility needs the number of CPUs for calculating the load limit. If
the average load is lower than that limit the next pending batch job is
started.

The number of CPUs is retrieved with an call to 'sysctlbyname'. This subroutine
writes the number (which is an integer) to the "ncpu" variable. The variable
ist defined as size_t, which is an unsigned integer but is never initalized. So
the result of this operation is undefined.

The value of ncpu after calling sysctlbyname:
current version: 34359738369
patched version: 1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-amd64 mailing list