Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2002 21:02:39 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Bruce A. Mah" <bmah@FreeBSD.ORG>
Cc:        Poul-Henning Kamp <phk@critter.freebsd.dk>, <freebsd-current@FreeBSD.ORG>
Subject:   Re: libmd bug on -CURRENT 
Message-ID:  <20020907204720.R19001-100000@gamplex.bde.org>
In-Reply-To: <200209061955.g86JtXsS005708@intruder.bmah.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Sep 2002, Bruce A. Mah wrote:

> If memory serves me right, Poul-Henning Kamp wrote:
>
> > Good catch.
> >
> > I'm surprised the compiler doesn't whine.
>
> Thanks, and "me too".

Warnings are mostly turned off for not unimportant places like libraries
since these places are too poorly written to compile without warnings.

> PS.  Actually I'm surprised that nobody caught the problem in the past
> five months...this bug prevented release builds from 5-CURRENT hosts.
> Maybe I'm the only person crazy enough to try this.  :-)

This bug was caught in PR 42384.  The fix in the PR is not so good.

libmd is also broken for some cases involving pipes.  IIRC, this is
caused by the bogus st_size checks in the same function.  st_size is
only valid for regular files.

The loop in the function fails to to terminate if read() returns 0,
which can probably happen if the file shrinks underneath us.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020907204720.R19001-100000>