fix: enable FFI_MMAP_EXEC_WRIT for DragonFly BSD#930
Merged
atgreen merged 1 commit intolibffi:masterfrom Aug 2, 2025
Merged
Conversation
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/
Contributor
Author
|
@atgreen, thank you! |
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.
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=2tunable (i.e., strict NX mode), Meld would crash upon the first diff operation.Fix the
configure.acscript to enableFFI_MMAP_EXEC_WRITfor DragonFly BSD. In addition, add it to the supported platforms table.[1] #265
[2] https://meldmerge.org/