[PATCH v3] nptl: Deallocate the thread stack on setup failure (BZ #19511)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Jun 2 13:39:43 GMT 2021
On 02/06/2021 10:08, Andreas Schwab wrote:
> On Jun 02 2021, Adhemerval Zanella via Libc-alpha wrote:
>
>> diff --git a/nptl/descr.h b/nptl/descr.h
>> index 3de9535449..9d8297b45f 100644
>> --- a/nptl/descr.h
>> +++ b/nptl/descr.h
>> @@ -340,8 +340,9 @@ struct pthread
>> /* True if thread must stop at startup time. */
>> bool stopped_start;
>>
>> - /* Formerly used for dealing with cancellation. */
>> - int parent_cancelhandling_unsed;
>> + /* Indicate that a thread creation setup has failed (for instance the
>> + scheduler or affinity). */
>> + int setup_failed;
>
> Perhaps this should be turned into a bitfield?
I do not want to change the 'struct parent' layout or size with this
patch. I discussed briefly with Florian on another thread and maybe
we can cleanup the struct pthread, there are a couple of unused fields
and others that can use a better type.
More information about the Libc-alpha
mailing list