This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Implement C11 annex K?
- From: William Park <opengeometry at yahoo dot ca>
- To: libc-alpha at sourceware dot org
- Date: Thu, 21 Aug 2014 21:38:51 -0400
- Subject: Re: Implement C11 annex K?
- Authentication-results: sourceware.org; auth=none
- References: <53F1B352 dot 3010207 at cs dot ucla dot edu> <E1XKb6n-0005Nu-Ap at rmm6prod02 dot runbox dot com>
On Thu, Aug 21, 2014 at 06:45:29PM -0400, David A. Wheeler wrote:
> Every package has to keep re-implementing them, typically in less-efficient
> portable ways, because glibc fails to include them.
...
> We need alternatives, ones that automatically *prevent* buffer overflows
> and can be easily applied.
...
> We need simple mechanisms that people can use *every time* that
> prevent buffer overflows.
...
> It's a *risk* decision. C should have routines that give you the fastest
> possible routines when you need them... but it should also have some
> less-risky functions for common cases.
I agree totally. Main problem of not including in glibc is that every
programmer has to carry around his/her own version. For me, I want
automatic termination, so my routines always assign \0 to the end of
destination array, if there is space for it. But, it's pain to carry
them around.
Does it have to be in glibc, though? Couldn't you include them (and
others) in a separate library? Maybe there is, but it's not included in
my distro. Hence, problem...
--
William