Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2016 13:10:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 206758] [PATCH] Uninitalized variable in atrun
Message-ID:  <bug-206758-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206758

            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@FreeBSD.org
          Reporter: public2016@hauptsignal.at
                CC: freebsd-amd64@FreeBSD.org
                CC: freebsd-amd64@FreeBSD.org
          Keywords: patch

Created attachment 166300
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D166300&action=
=3Dedit
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 subrou=
tine
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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206758-8>