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 2/4] Initialize tunable list with the GLIBC_TUNABLES environment variable


On 12/31/2016 04:55 PM, Siddhesh Poyarekar wrote:


On Saturday 31 December 2016 09:20 PM, Siddhesh Poyarekar wrote:
On Saturday 31 December 2016 09:15 PM, Florian Weimer wrote:
This still has an implicit comparision against '\0', which is against
the style guide.

Ack, I'll fix it up.

+  /* FIXME: In reality this will not return NULL, it will crash
attempting to
+     set the thread-local errno since the TCB has not yet been set
up.  This
+     needs to be fixed with an __sbrk implementation that does not set
+     errno.  */
+  if (out == (void *)-1)
+    return NULL;

Comment does not match: NULL is not (void *) -1.

I changed it to:


FIXME: In reality if the allocation fails, __sbrk will crash attempting
to set the thread-local errno since the TCB has not yet been set up.
This needs to be fixed with an __sbrk implementation that does not set
errno.

Fine with me.  Thanks.

Florian


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