This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Errors from cppcheck


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]