hrev53150 adds 1 changeset to branch 'master'
old head: 33f7f28798bae58fbdf7b2437cdc7cb4e0ee96ab
new head: 3802df804f6dfc8ec4fd94b0619e6b0afb96ebf2
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=3802df804f6d+%5E33f7f28798ba
----------------------------------------------------------------------------
3802df804f6d: pthread_key: set value planned for destruction to NULL.
* This fixes bug fix #10951.
Change-Id: I152cea3651b3307171ea4d6a0c49aceae2f0f797
Reviewed-on: https://review.haiku-os.org/c/1456
Reviewed-by: Rene Gollent <rene@xxxxxxxxxxx>
[ Jérôme Duval <jerome.duval@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53150
Commit: 3802df804f6dfc8ec4fd94b0619e6b0afb96ebf2
URL: https://git.haiku-os.org/haiku/commit/?id=3802df804f6d
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Fri May 17 15:46:49 2019 UTC
Committer: waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Mon May 20 14:09:15 2019 UTC
Ticket: https://dev.haiku-os.org/ticket/10951
----------------------------------------------------------------------------
1 file changed, 3 insertions(+), 1 deletion(-)
src/system/libroot/posix/pthread/pthread_key.cpp | 4 +++-
----------------------------------------------------------------------------
diff --git a/src/system/libroot/posix/pthread/pthread_key.cpp
b/src/system/libroot/posix/pthread/pthread_key.cpp
index 431a4d4481..be251f71f1 100644
--- a/src/system/libroot/posix/pthread/pthread_key.cpp
+++ b/src/system/libroot/posix/pthread/pthread_key.cpp
@@ -35,7 +35,7 @@ get_key_destructor(uint32 key, int32& sequence)
/*! Function to get the thread specific value of a key in a lockless
- way.
+ way. The thread specific value is reset to NULL.
\a sequence must be the sequence of the key table that this value
has to fit to.
*/
@@ -54,6 +54,8 @@ get_key_value(pthread_thread* thread, uint32 key, int32
sequence)
value = keyData.value;
} while (specificSequence != sequence);
+ keyData.value = NULL;
+
return value;
}