Introduce GAP_SETJMP and GAP_LONGJMP wrappers - #6539
Merged
Conversation
All uses of _setjmp/_longjmp go through the new macros. On POSIX systems they expand to exactly those functions, which skip the signal mask and thus are much faster than setjmp/longjmp. Native Windows (mingw) has no _setjmp/_longjmp with these semantics -- its two-argument _setjmp intrinsic is unrelated -- so the macros fall back to plain setjmp/longjmp there. This also touches the public GAP_Error_Setjmp() in libgap-api.h. Part of the MinGW port, see issue #4157; the approach was first explored in PR #6077. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6539 +/- ##
==========================================
- Coverage 79.00% 78.98% -0.03%
==========================================
Files 684 684
Lines 294205 294206 +1
Branches 8647 8670 +23
==========================================
- Hits 232444 232369 -75
- Misses 59955 60029 +74
- Partials 1806 1808 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lgoettgens
approved these changes
Aug 31, 2026
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.
All uses of _setjmp/_longjmp go through the new macros. On POSIX systems they expand to exactly those functions, which skip the signal mask and thus are much faster than setjmp/longjmp. Native Windows (mingw) has no _setjmp/_longjmp with these semantics -- its two-argument _setjmp intrinsic is unrelated -- so the macros fall back to plain setjmp/longjmp there.
This also touches the public GAP_Error_Setjmp() in libgap-api.h.
Part of the MinGW port, see issue #4157; the approach was first explored in PR #6077.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com