Skip to content

Introduce GAP_SETJMP and GAP_LONGJMP wrappers - #6539

Merged
fingolfin merged 1 commit into
masterfrom
mh/gap-setjmp
Aug 31, 2026
Merged

Introduce GAP_SETJMP and GAP_LONGJMP wrappers#6539
fingolfin merged 1 commit into
masterfrom
mh/gap-setjmp

Conversation

@fingolfin

@fingolfin fingolfin commented Aug 29, 2026

Copy link
Copy Markdown
Member

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

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>
@fingolfin fingolfin added os: windows Issues and PRs that are (at least partially) specific to Windows topic: kernel labels Aug 29, 2026
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.98%. Comparing base (989cc35) to head (88ecdf5).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fingolfin fingolfin added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Aug 31, 2026
@fingolfin
fingolfin merged commit 6f1aae8 into master Aug 31, 2026
33 checks passed
@fingolfin
fingolfin deleted the mh/gap-setjmp branch August 31, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

os: windows Issues and PRs that are (at least partially) specific to Windows release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants