Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 01:42:45 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        "Pedro F. Giffuni" <pfg@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r328340 - in head/sys: fs/ext2fs ufs/ffs ufs/ufs
Message-ID:  <20180126010213.X1950@besplex.bde.org>
In-Reply-To: <201801241644.w0OGivto028334@repo.freebsd.org>
References:  <201801241644.w0OGivto028334@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 24 Jan 2018, Pedro F. Giffuni wrote:

> Log:
>  Revert r327781,  r328093, r328056:
>  ufs|ext2fs: Revert uses of mallocarray(9).
>
>  These aren't really useful: drop them.
>  Variable unsigning will be brought again later.

Variable "unsigning" (that is, adding unsign extension bugs) is even more
negatively useful than mallocarray(), so should not be brought back.

Unsigning variables used _only_ for array sizes and element counts doesn't
cause any new problems (and fixes warnings about converting from signed to
unsigned when calling malloc*()), but it is a lot of work to check that
they aren't used for other things where their signedness matters (perhaps
differences or loops that count down to -1 instead of 0).

Unsigned variables also break checking for overflow in expressions by
compiling with -ftrapv.

Bruce



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