This is the mail archive of the 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]

GNU C Library master sources branch, master, updated. glibc-2.14-551-ge988dba

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  e988dba98d852d08707d00eec0072548fdf2eb24 (commit)
      from  26428b7c692af44c61150677b6798294ccd397a0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------;a=commitdiff;h=e988dba98d852d08707d00eec0072548fdf2eb24

commit e988dba98d852d08707d00eec0072548fdf2eb24
Author: Jeff Law <>
Date:   Wed Dec 14 13:14:56 2011 -0800

    BZ #5245: pthread_create returns EAGAIN for stack allocation failure, not ENOMEM.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 448aa93..bdf6129 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-14  Jeff Law  <>
+	[BZ #5245]
+	* pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
 2011-11-28  Andreas Schwab  <>
 	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index f1113fb..6250d03 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -457,8 +457,9 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
   int err = ALLOCATE_STACK (iattr, &pd);
   if (__builtin_expect (err != 0, 0))
     /* Something went wrong.  Maybe a parameter of the attributes is
-       invalid or we could not allocate memory.  */
-    return err;
+       invalid or we could not allocate memory.  Note we have to
+       translate error codes.  */
+    return err == ENOMEM ? EAGAIN : err;
   /* Initialize the TCB.  All initializations with zero should be


Summary of changes:
 nptl/ChangeLog        |    5 +++++
 nptl/pthread_create.c |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

GNU C Library master sources

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