Skip to content

Implement get_thread_pointer in PreExecuter#310

Merged
yuri91 merged 1 commit intomasterfrom
fix-preexecuter-get-thread-pointer
Jul 3, 2025
Merged

Implement get_thread_pointer in PreExecuter#310
yuri91 merged 1 commit intomasterfrom
fix-preexecuter-get-thread-pointer

Conversation

@Maqrkk
Copy link
Member

@Maqrkk Maqrkk commented Jul 3, 2025

The PreExecuter would fail when trying to execute the intrinsic llvm.cheerp.get.thread.pointer. And since this would occur in the global constructor with priority 101, no other global constructors would run. This commit introduces a simple fix: we return 0. The code that actually calls this intrinsic in musl then will use __dummy_thread as the thread pointer.

The PreExecuter would fail when trying to execute the intrinsic llvm.cheerp.get.thread.pointer. And since this would occur in the global constructor with priority 101, no other global constructors would run.
This commit introduces a simple fix: we return 0. The code that actually calls this intrinsic in musl then will use __dummy_thread as the thread pointer.
@Maqrkk Maqrkk requested a review from yuri91 July 3, 2025 06:37
@yuri91 yuri91 merged commit 566f086 into master Jul 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants