This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug nptl/801] NPTL pthread_create siliently fails to create thread if non-zero priority used with SCHED_OTHER policy
- From: "steve dot hawkes at motorola dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 25 Mar 2005 23:58:46 -0000
- Subject: [Bug nptl/801] NPTL pthread_create siliently fails to create thread if non-zero priority used with SCHED_OTHER policy
- References: <20050324001227.801.steve.hawkes@motorola.com>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From steve dot hawkes at motorola dot com 2005-03-25 23:58 -------
Subject: RE: NPTL pthread_create siliently fails to create
thread if non-zero priority used with SCHED_OTHER policy
There is a bug. The pthread_create() call does not return EINVAL. It returns
0 but does not create a thread. Please look more closely at the patch. The
problem is really quite straightforward. If the description of the problem
isn't clear enough (although I believe it is), just try compiling
pthread_create.c with -Wshadow. You will see that the declaration of 'err'
on line 409 shadows that on line 351, which is not what was intended by the
developer of the code and which causes it to fail silently.
In the example code, this line is printed from the created thread only if
the bug is fixed:
**** Success, created thread exiting
When the example code is run on the unpatched pthread_create.c, the above
line is not printed because the thread is never created, and
pthread_create() does not return EINVAL, it returns 0, as shown by this
line:
Thread creation returned 0
-----Original Message-----
From: drepper at redhat dot com
[mailto:sourceware-bugzilla@sources.redhat.com]
Sent: Wednesday, March 23, 2005 7:02 PM
To: Hawkes Steve-FSH016
Subject: [Bug nptl/801] NPTL pthread_create siliently fails to create thread
if non-zero priority used with SCHED_OTHER policy
------- Additional Comments From drepper at redhat dot com 2005-03-24 01:01
------- There is no bug. The pthread_create calls fails, returns EINVAL,
and that's it. There is
**** Success, created thread exiting
output since pthread_create doesn't create a thread.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://sources.redhat.com/bugzilla/show_bug.cgi?id=801
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=801
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.