Changes between Initial Version and Version 1 of Ticket #10951, comment 6
- Timestamp:
- May 16, 2019, 9:01:12 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10951, comment 6
initial v1 1 UPDATE: was wrongly uninstalling the destructor. 2 1 3 I have tested two fix possibilities: 2 * uninstall the destructor, so it won't be called a second time.4 * reset the value, so it won't be called a second time. 3 5 * call !__cxa_finalize() before _thread_do_exit_work() 4 6 … … 7 9 {{{ 8 10 diff --git a/src/system/libroot/posix/pthread/pthread_key.cpp b/src/system/libroot/posix/pthread/pthread_key.cpp 9 index 431a4d4481.. 9777205fa310064411 index 431a4d4481..a34ab022f0 100644 10 12 --- a/src/system/libroot/posix/pthread/pthread_key.cpp 11 13 +++ b/src/system/libroot/posix/pthread/pthread_key.cpp 12 @@ - 30,6 +30,8 @@ get_key_destructor(uint32 key, int32&sequence)13 destructor = sKeyTable[key].destructor;14 } while (s KeyTable[key].sequence != sequence);14 @@ -54,6 +54,8 @@ get_key_value(pthread_thread* thread, uint32 key, int32 sequence) 15 value = keyData.value; 16 } while (specificSequence != sequence); 15 17 16 + sKeyTable[key].destructor= NULL;18 + keyData.value = NULL; 17 19 + 18 return destructor;20 return value; 19 21 } 20 22 23 }}} 21 24 22 }}}23 25 and 24 26