Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Jul 2016 08:06:16 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 210839] databases/db5: util/db_tuner.c has K&R short int parameters with int arguments on the stack
Message-ID:  <bug-210839-13@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 210839
           Summary: databases/db5: util/db_tuner.c has K&R short int
                    parameters with int arguments on the stack
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mandree@FreeBSD.org
          Reporter: markmi@dsl-only.net
          Assignee: mandree@FreeBSD.org
             Flags: maintainer-feedback?(mandree@FreeBSD.org)

util/db_tuner.c (there are 2?) has code of the structure (using old K&R C
syntax):

static int
item_space(dbp, h, indx)
        DB *dbp;
        PAGE *h;
        db_indx_t indx;
. . .
static int
item_size(dbp, h, indx)
        DB *dbp;
        PAGE *h;
        db_indx_t indx;
. . .
                                onpd_sz +=3D item_space(dbp, h, indx + O_IN=
DX);
. . .
                                data_sz =3D item_size(dbp, h, indx + O_INDX=
);

but the arithmetic in the last arguments in each case above do not produce =
type
db_indx_t (a.k.a. short int) on the stack in general but instead int.

This sort of thing in K&R C type-handling contexts makes the code big endian
vs. little endian (vs. pdp-endian) sensitive and the like.

The compiler doing the build (targeting armv6 with -mcpu=3Dcortex-a7) repor=
ted
the problems.

--=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-210839-13>