Changes between Initial Version and Version 1 of Ticket #10951, comment 6


Ignore:
Timestamp:
May 16, 2019, 9:01:12 PM (5 years ago)
Author:
korli

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10951, comment 6

    initial v1  
     1UPDATE: was wrongly uninstalling the destructor.
     2
    13I 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.
    35* call !__cxa_finalize() before _thread_do_exit_work()
    46
     
    79{{{
    810diff --git a/src/system/libroot/posix/pthread/pthread_key.cpp b/src/system/libroot/posix/pthread/pthread_key.cpp
    9 index 431a4d4481..9777205fa3 100644
     11index 431a4d4481..a34ab022f0 100644
    1012--- a/src/system/libroot/posix/pthread/pthread_key.cpp
    1113+++ 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 (sKeyTable[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);
    1517 
    16 +       sKeyTable[key].destructor = NULL;
     18+       keyData.value = NULL;
    1719+
    18         return destructor;
     20        return value;
    1921 }
    2022 
     23}}}
    2124
    22 }}}
    2325and
    2426