🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4912

Re: BoundsChecker and fgets fmalloc problems

#4912
From: Stephen Baynes
Date: Tue, 19 Mar 1996 08:45
37 lines
1871 bytes
Brian Gregory (bri@primenet.com) wrote:
: I am using Bounds Checker v2.5, and am having a problem finding a
: memory leak it is reporting...

: Example:

: fgets( szBuf, 799, fpIn );

: szBuf is an 800 character buffer (pre-sized array)
: fpIn IS a valid pointer
: no memory is corrupt before the fgets line
: The application is a windows app, written in straight C with a large
: memory model.

: The problem is Boundschecker consistently reports memory leaks for the
: larger buffer size mallocs contained WITHIN the fgets function...

I don't think that the ANSI standard makes any requirement on library functions
that they should not leak memory. (Can anyone construct a requirement from
any execution limit?). So as far as the standard is concerened there is nothing
wrong with your fgets.

: Any help on resolving this recurrent problem, or just an indication
: that this is perhaps an erroneous error reported by Boundschecker
: would be greatly appreciated.

Quality of implementation issues of specific implementations are
outside the scope of this newsgroup. I suggest you take it up with your
supplier or in the newsgroup for your platform.



--
Stephen Baynes                              baynes@ukpsshp1.serigate.philips.nl
Philips Semiconductors Ltd
Southampton                                 My views are my own.
United Kingdom
Technical Details
Message-ID: <DoIAz4.E77@ukpsshp1.serigate.philips.nl>
Path: arc1-ca.pugleaf.net!phcoms4.seri.philips.nl!panther!baynes
References: <4ikelh$gji@nnrp1.news.primenet.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!phcoms4.seri.philips.nl!panther!baynes
From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
Subject: Re: BoundsChecker and fgets fmalloc problems
Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
Message-ID: <DoIAz4.E77@ukpsshp1.serigate.philips.nl>
Date: Tue, 19 Mar 1996 08:45:04 GMT
References: <4ikelh$gji@nnrp1.news.primenet.com>
Organization: Philips Semiconductors, Southampton, UK
X-Newsreader: TIN [version 1.2 PL2]