If WASM app has called pthread_detach() to detach a thread, it will be detached again when thread exits. Attempting to detach an already detached thread may result in crash in musl-libc. This patch fixes it.
If WASM app has called pthread_detach() to detach a thread, it will be detached again when thread exits. Attempting to detach an already detached thread may result in crash in musl-libc. This patch fixes it.