Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2015 22:09:53 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Ed Maste <emaste@freebsd.org>, NGie Cooper <yaneurabeya@gmail.com>, freebsd-arch <freebsd-arch@freebsd.org>
Subject:   Re: [RFC] importing e* (embolic, estrdup, etc) functions from NetBSD (libc/libutil or libnetbsd)?
Message-ID:  <20151019220953.GC64504@spindle.one-eyed-alien.net>
In-Reply-To: <94056.1445291412@critter.freebsd.dk>
References:  <74F6DD3C-42F6-490B-A08E-245A1338A3E7@gmail.com> <CAPyFy2AuDPL4qgawfaRhyWA1dp=29VfFBAdi06ygZ2UABB=D3Q@mail.gmail.com> <20151019212750.GB64504@spindle.one-eyed-alien.net> <94056.1445291412@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

--LpQ9ahxlCli8rRTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 19, 2015 at 09:50:12PM +0000, Poul-Henning Kamp wrote:
> --------
> In message <20151019212750.GB64504@spindle.one-eyed-alien.net>, Brooks Da=
vis writes:
>=20
> >This feels like the right approach to me as well.
>=20
> I looked at it at one point and I found it seriously lacking.

By "This" I ment, sticking them in libnetbsd.  For code we don't actively
maintain, I'd rather pick up some extra funcitions in libnetbsd than
convert the code to match our prefered mechanism unless there's a good
reason to.

> The philosophy seems to be "just stick 'e' in front and you're done"
> but in practice that is not even close.

If one wanted this approach, a libc replacment that fails stop on
unrecoverable errors might be more interesting approach (somwhat with
different, but still signficant limitations).

> The *real* problem they're trying to solve is safe string handling,
> and the e* functions only cover a small corner area of that space.
>=20
> Their implemenation also seems half-hearted in many ways.  For
> instance they have not specified what happens if the error handler
> returns to the e* function.
>
> And finally, C-with-exceptions ?  Really ?
>=20
> I far prefer sbuf(3) to e*(3)

For our code, I think I agree.

-- Brooks

--LpQ9ahxlCli8rRTG
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJWJWoxAAoJEKzQXbSebgfACL8IAI0COG1Myk/g9g3DoQ1ZESAk
0gsLseQvEatDNcGgFpDSF24+awe8Vm2H8QnZHlHS1YUxeIsWvaLfEjKHKRaRLVyE
9yLw8zWRmaqR4RrDxCbS5COFTK3m043TfW6ugVRNTGgFkHXVYHlBvjsFwz9RGYRb
MhOKJqvtQOSEq3ZINwVNQj0WnBlse5JipUg8r0cDBMfmE3kSzEvWtIkhnie78iKL
f+dkw8k/QCQb1zA+xDrAwqLenW6+TSfThUkU+ACamleFI0d+rcg7S+yfezZKpm3z
TtHPO4WYaZSD28PxrZ7e4c2mSYkYSFd8PIBVbPliwZ9S66vrDDUr+1K+tYOJgW0=
=SOhk
-----END PGP SIGNATURE-----

--LpQ9ahxlCli8rRTG--



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