]> git.ipfire.org Git - thirdparty/gcc.git/commit
libphobos: Don't call __gthread_key_delete in the emutls destroy function.
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 19 Nov 2021 13:26:07 +0000 (14:26 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 19 Nov 2021 14:06:15 +0000 (15:06 +0100)
commit910d2b4b7513b6bfe02777d44cd5377c22198086
treef9e74eea954a17c503575d84f4491bf49df170ec
parent908764b4a04b3205527dda80330749e59604200e
libphobos: Don't call __gthread_key_delete in the emutls destroy function.

Fixes a EXC_BAD_ACCESS issue seen on Darwin when the libphobos DSO gets
unloaded.  Based on reading libgcc's emutls implementation, as it
doesn't call __gthread_key_delete directly, neither should libphobos.

libphobos/ChangeLog:

* libdruntime/gcc/emutls.d (emutlsDestroyThread): Don't remove entry
from global array.
(_d_emutls_destroy): Don't call __gthread_key_delete.

(cherry picked from commit d686cb0d740b0278fdbd7915f43faff14b203888)
libphobos/libdruntime/gcc/emutls.d