[PATCH] Remove `attr != NULL' assert in allocate_stack.
Thomas Schwinge
thomas@codesourcery.com
Sat Jan 12 10:21:00 GMT 2013
Hi!
On Thu, 10 Jan 2013 23:37:54 -0500, "Carlos O'Donell" <codonell@redhat.com> wrote:
> The allocate_stack function is an internal function that is used
> only by glibc and only from pthread_create. We don't need an
> assert on a value we control and we know to be non-NULL. Just
> like we don't assert that pdp is non-NULL, or any other number
> of input arguments we control entirely.
How about we use »__attribute__ ((nonnull))« to a) document that, and b)
have the compiler warn in cases where this is violated (and is statically
detectable)? Or would that be too much effort for too little gain? (It
certainly makes sense for interfaces that are externally used.)
Grüße,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130112/60c186ee/attachment.sig>
More information about the Libc-alpha
mailing list