Skip to content

[clr-ios] PAL CreateThread crashes when initialized with PAL_InitializeDLL #125976

@kotlarmilos

Description

@kotlarmilos

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions