Skip to content

Rpi5 fix#515

Merged
pyscripter merged 2 commits into
lmbelo:masterfrom
comdora:rpi5-fix
Nov 26, 2025
Merged

Rpi5 fix#515
pyscripter merged 2 commits into
lmbelo:masterfrom
comdora:rpi5-fix

Conversation

@comdora

@comdora comdora commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

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:

  • Raspberry Pi 5
  • FPC 3.2.2
  • Lazarus 4.0
  • Python 3.13
  • P4D latest

This resolves the callback crash on CPUARM64.

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
@pyscripter pyscripter merged commit d02e0fb into lmbelo:master Nov 26, 2025
1 check passed
@pyscripter

Copy link
Copy Markdown
Collaborator

Thanks!

@comdora

comdora commented Nov 26, 2025 via email

Copy link
Copy Markdown
Contributor Author

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