[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] pthread: fix the stale TSDs when deleting a key

From: Pino Toscano
Subject: [PATCH] pthread: fix the stale TSDs when deleting a key
Date: Wed, 2 Nov 2011 18:03:04 +0100
User-agent: KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; )


as I found few months ago[1], when calling pthread_key_delete() all its
values in threads are not removed; this, plus the the fact that deleted
keys can be reused in pthread_key_create(), causes that in some
occasions (i.e. when a new key is actually a reused one) there are the
old thread specific data still available in threads which previously set
some using the key prior of being deleted and reused again.

Attached there is a patch fixing this behaviour by cleaning up all the
values of the key being deleted. It includes also a small test case.


Pino Toscano

Attachment: 0001-Remove-all-the-values-when-deleting-a-key.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]