Skip to content

fix: enable FFI_MMAP_EXEC_WRIT for DragonFly BSD#930

Merged
atgreen merged 1 commit intolibffi:masterfrom
liweitianux:support-dragonfly
Aug 2, 2025
Merged

fix: enable FFI_MMAP_EXEC_WRIT for DragonFly BSD#930
atgreen merged 1 commit intolibffi:masterfrom
liweitianux:support-dragonfly

Conversation

@liweitianux
Copy link
Copy Markdown
Contributor

Similar to PR #265 [1], we need to enable FFI_MMAP_EXEC_WRIT to use explicit write+exec mapping on DragonFly BSD.

Without this fix, we were having segfaults with Meld [2]; it would crash with SIGSEGV after 5 diff operations. The crash was caused by it attempting to execute code from non-execute memory region. Moreover, if we set the machdep.pmap_nx_enable=2 tunable (i.e., strict NX mode), Meld would crash upon the first diff operation.

Fix the configure.ac script to enable FFI_MMAP_EXEC_WRIT for DragonFly BSD. In addition, add it to the supported platforms table.

[1] #265
[2] https://meldmerge.org/

Similar to PR libffi#265 [1], we need to enable FFI_MMAP_EXEC_WRIT to use
explicit write+exec mapping on DragonFly BSD.

Without this fix, we were having segfaults with Meld [2]; it would crash
with SIGSEGV after 5 diff operations.  The crash was caused by it
attempting to execute code from non-execute memory region.  Moreover, if
we set the `machdep.pmap_nx_enable=2` tunable (i.e., strict NX mode),
Meld would crash upon the first diff operation.

Fix the `configure.ac` script to enable `FFI_MMAP_EXEC_WRIT` for
DragonFly BSD.  In addition, add it to the supported platforms table.

[1] libffi#265
[2] https://meldmerge.org/
@atgreen atgreen merged commit b7885ac into libffi:master Aug 2, 2025
1 of 23 checks passed
@liweitianux
Copy link
Copy Markdown
Contributor Author

@atgreen, thank you!

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