Skip to content

Fix bare metal boot loop - #1444

Open
randomtwdude wants to merge 2 commits into
jart:masterfrom
randomtwdude:metal
Open

Fix bare metal boot loop#1444
randomtwdude wants to merge 2 commits into
jart:masterfrom
randomtwdude:metal

Conversation

@randomtwdude

Copy link
Copy Markdown

This PR fixes the boot looping on bare metal.

  • One of the init stubs _init_metalfile calls memmove() before the jump table is set up
  • The global variable __pid is never set on metal. Causing lock acquisitions by mmap() to always fail.

@github-actions github-actions Bot added the libc label Sep 26, 2025

@jart jart left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you for figuring this out. This will be helpful when the release goes out. Could you send the email mentioned in https://github.com/jart/cosmopolitan/blob/master/CONTRIBUTING.md#copyright-assignment so I can merge this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants