You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate native jump-buffer parameters as pointers so setjmp writes caller-owned storage.
The implementation includes:
Canonicalize C array-typedef parameters to Clang-equivalent pointer declarations before generation, with C function-type equality checks.
Keep generated __sigsetjmp methods with their owning jump-buffer type and restore jmp_buf/sigjmp_buf mappings.
Preserve the existing compatibility API and test that the initial native setjmp changes the caller buffer without executing longjmp.
Validation: llgo build and llgo test -v ./c/setjmp pass on macOS arm64, Linux amd64 and Linux arm64, both normally and with -tags=nogc, using the combined prerequisite snapshot.
Generated with unmodified llcppg main da227ff4, macOS SDK 14.0 and the oldest Bootlin stable glibc 2.24 headers. The build/test results cover the current native environments.
The native API is now generated without dropping declarations merely because compatibility code already exists.
Each draft changes one folder only. This refresh regenerates native APIs without omitting functions merely to preserve handwritten entry points. Existing compatibility APIs remain available; colliding native names use the Native prefix.
The combined prerequisite snapshot passes llgo build and executed llgo test runs on macOS arm64, Linux amd64 and Linux arm64, both with GC and -tags=nogc (54 package test runs and 6 complete builds). Generation uses unmodified llcppg main da227ff4, macOS SDK 14.0 and Bootlin glibc 2.24 headers. The earlier Timeval receiver and Signal layout failures are resolved.
These PRs remain draft for review. Documented generator/ABI failures and previously approved va_list exclusions remain; there are zero handwritten-retention exclusions.
MeteorsLiu
changed the title
feat(c/setjmp): add classified native jump APIs
fix(c/setjmp): generate native pointer parameters
Oct 20, 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
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.
Generate native jump-buffer parameters as pointers so setjmp writes caller-owned storage.
The implementation includes:
llgo buildandllgo test -v ./c/setjmppass on macOS arm64, Linux amd64 and Linux arm64, both normally and with-tags=nogc, using the combined prerequisite snapshot.Generated with unmodified llcppg main
da227ff4, macOS SDK 14.0 and the oldest Bootlin stable glibc 2.24 headers. The build/test results cover the current native environments.The native API is now generated without dropping declarations merely because compatibility code already exists.