Description
Components that statically link libcoreclrpal.a and initialize with PAL_InitializeDLL() crash with abort() when calling the PAL CreateThread.
Impact
The remote debugger profiler needs to spawn a background thread for its gRPC server during ICorProfilerCallback::Initialize. The crash prevents the debugger from starting at all. No debug session is possible without working around this.
Root cause
PAL_InitializeDLL() initializes the PAL for the calling thread but does not set up the process-level thread management infrastructure.
Fix
Use pthread_create/pthread_detach directly instead of the PAL CreateThread on Unix platforms.
Description
Components that statically link
libcoreclrpal.aand initialize withPAL_InitializeDLL()crash withabort()when calling the PALCreateThread.Impact
The remote debugger profiler needs to spawn a background thread for its gRPC server during
ICorProfilerCallback::Initialize. The crash prevents the debugger from starting at all. No debug session is possible without working around this.Root cause
PAL_InitializeDLL()initializes the PAL for the calling thread but does not set up the process-level thread management infrastructure.Fix
Use
pthread_create/pthread_detachdirectly instead of the PALCreateThreadon Unix platforms.