Skip to content

Fix 32 bit ARM crashing bugs#555

Open
varjagg wants to merge 2 commits into
Clozure:masterfrom
varjagg:master
Open

Fix 32 bit ARM crashing bugs#555
varjagg wants to merge 2 commits into
Clozure:masterfrom
varjagg:master

Conversation

@varjagg

@varjagg varjagg commented Jun 23, 2026

Copy link
Copy Markdown

This is to address #520 and #428 crashing bugs on 32 bit ARM. The patch was generated after some time with Codex and only approximate understanding on my part so discretion is advised. Nonetheless it appears to have stopped crashes on my test board both with our codebase and lparallel as referred in #520. Both were reproducing robustly before the change.

What it's supposed to do:

  • recognize the short ARM allocation prologue
  • computes how much of the allocptr adjustment has already happened
  • account the original free pointer
  • sets allocptr to the fully adjusted tagged value
  • moves PC to the allocation trap

@xrme

xrme commented Jun 25, 2026

Copy link
Copy Markdown
Member

"Approximate understanding" is what I have as well...

}

return 0;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like it was borrowed from the allocptr_displacement() function.

@varjagg

varjagg commented Jun 25, 2026

Copy link
Copy Markdown
Author

"Approximate understanding" is what I have as well...

Right I really struggled with understanding the mechanism here, my only understanding is that it's a very specific memory/tagging race with exception handling.

If it's hard to make sense I suggest we wait a couple weeks while my boards run on this branch a bit. That doesn't add much on top of the years these bugs are there. If they still work then, merging perhaps still would make sense as in my experience arm32 runtime is effectively broken.

@xrme

xrme commented Jun 25, 2026

Copy link
Copy Markdown
Member

OK, we'll wait while you run this code for a while.

I agree that the arm32 runtime is buggy, and given that your patch seems to help, I'm inclined to merge even if I don't completely understand it.

The whole pc_luser_xp() scheme is extremely complicated. I'm becoming convinced that we'd be better off if we polled for gc/interrupts instead.

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