This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove `attr != NULL' assert in allocate_stack.


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]