Rpi5 fix#515
Merged
Merged
Conversation
This patch fixes the SIGSEGV crash on ARM64 Raspberry Pi 5 caused by mmap not allocating executable memory correctly. It adds a fallback to mmap + mprotect with correct permissions, making Python4Delphi callbacks stable on ARM64. Tested on Raspberry Pi 5, FreePascal 3.2.2, Lazarus 4.0
Collaborator
|
Thanks! |
Contributor
Author
|
You are welcome.
Everything I can do to help you, I am at your disposal.
I use RPI5, RPI4, older MAC OS (10.15.7), Windows, Ubuntu 22.04
On RPI and UBUNTU I use LAZARUS, on Windows Delphi (12.1)
…On Wed, Nov 26, 2025 at 12:57 PM pyscripter ***@***.***> wrote:
*pyscripter* left a comment (lmbelo/python4delphi#515)
<#515 (comment)>
Thanks!
—
Reply to this email directly, view it on GitHub
<#515 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVCF2XBFGH2WNP7EEHASHT36WIRXAVCNFSM6AAAAACNH35V7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOBQHE3TINRTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for ARM64 (Raspberry Pi 5) where GetCallBack causes SIGSEGV because
nmap does not allocate executable memory. Added fallback to mmap +
mprotect, corrected literal pool placement, and ensured RX permissions.
Tested on:
This resolves the callback crash on CPUARM64.