Hello, There seems to be a difference in pthread behavior when compiling with glibc and using the musl-gcc wrapper. The attached snippet of code creates a destructor attribute which deletes a pthread key. The code never actually creates the pthread key. This code segfaults when compiled using musl-gcc, and does not segfault when compiled with gcc. Best guess at what is going on: When creating a pthread key, musl initializes a field called tsd. When deleting a key, musl assumes that initialization has been done, and dereferences tsd without checking that it exists: see here. This dereference may be the source of the segfault. Thanks, Madeleine