This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Errors from cppcheck
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Brooks Moses <bmoses at google dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 4 Sep 2013 11:58:11 +0000
- Subject: Re: Errors from cppcheck
- Authentication-results: sourceware.org; auth=none
- References: <20130824094123 dot GA21033 at domone dot kolej dot mff dot cuni dot cz> <521B9D97 dot 7010506 at google dot com> <Pine dot LNX dot 4 dot 64 dot 1308272023180 dot 16068 at digraph dot polyomino dot org dot uk> <CAOxa4KqsCdqE_D_8f+9taY9FyuQzC5rG52q3GMrw+B2HNZD3sw at mail dot gmail dot com>
On Tue, 3 Sep 2013, Brooks Moses wrote:
> On Tue, Aug 27, 2013 at 1:33 PM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
> > On Mon, 26 Aug 2013, Brooks Moses wrote:
> >> > vim stdlib/isomac.c +266 # (error) Memory leak: command
> >> REAL BUG: This does look like a memory leak.
> >> Filed as BZ/15893.
> >
> > But as it's a testcase rather than library code, I don't think it matters
> > at all. (Really I should add C90 Amendment 1 support to conformtest and
> > kill stdlib/isomac. Eliminating posix/annexc requires a bit more work -
> > finishing checking the POSIX.1-1996 support in conformtest and adding
> > POSIX.1-1990 support, as that test appears to be a hybrid of those - which
> > in turn requires buying a copy of POSIX.1-1990 from an antiquarian
> > bookseller, as the last time I checked IEEE Xplore had the 1993 edition
> > scanned, but not the 1990 one.)
>
> So, $3.95 later (including shipping), I have a copy. What information
> would you need from it?
Details of the requirements on headers - what symbols they must, or may,
define, with what types, requirements to be constants, restrictions on
the values of those constants, etc.
I didn't say this was simple - at least in the 1996 edition the
information is spread all over the place, with Annex C giving a
non-normative summary. Annex C is the best place there to indicate
expectations for symbols coming from ISO C, but it doesn't include types
(spread all over the standard where semantics for individual functions are
defined), or the whole header tar.h, or details of what headers may (or
must) include what other headers, or details of symbol prefixes and
suffixes reserved by particular headers. The older versions of POSIX have
no equivalent of the manpages for individual headers in the versions based
on the Single Unix Specification; checking things against those (or UNIX98
/ XPG4 / XPG3) is a lot simpler than against the 1996 and older versions
of POSIX (albeit that the older POSIX versions have a lot fewer
interfaces).
--
Joseph S. Myers
joseph@codesourcery.com