Avoid boxing errno during signal-frame setup - #15050
Merged
Merged
Conversation
Contributor
Author
|
This was found by the checkescape rewrite in #15033. |
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex
tamird
force-pushed
the
sigframe-errno
branch
from
September 27, 2026 14:01
9743026 to
5ea6855
Compare
xinzhong
approved these changes
Sep 27, 2026
Contributor
Author
|
@xinzhong could you please start the import? |
copybara-service Bot
pushed a commit
that referenced
this pull request
Sep 27, 2026
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex FUTURE_COPYBARA_INTEGRATE_REVIEW=#15050 from tamird:sigframe-errno 5ea6855 PiperOrigin-RevId: 989285344
copybara-service Bot
pushed a commit
that referenced
this pull request
Sep 28, 2026
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex FUTURE_COPYBARA_INTEGRATE_REVIEW=#15050 from tamird:sigframe-errno 5ea6855 PiperOrigin-RevId: 989285344
copybara-service Bot
pushed a commit
that referenced
this pull request
Sep 28, 2026
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex FUTURE_COPYBARA_INTEGRATE_REVIEW=#15050 from tamird:sigframe-errno 5ea6855 PiperOrigin-RevId: 989285344
copybara-service Bot
pushed a commit
that referenced
this pull request
Sep 28, 2026
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex FUTURE_COPYBARA_INTEGRATE_REVIEW=#15050 from tamird:sigframe-errno 5ea6855 PiperOrigin-RevId: 989285344
copybara-service Bot
pushed a commit
that referenced
this pull request
Sep 28, 2026
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate [1]. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a. Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks. [1]: https://github.com/golang/go/blob/go1.26.3/src/runtime/iface.go#L400-L408 Assisted-by: Codex FUTURE_COPYBARA_INTEGRATE_REVIEW=#15050 from tamird:sigframe-errno 5ea6855 PiperOrigin-RevId: 989285344
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.
CallWithSignalFrame runs without stack splitting from KVM's bluepill path, but converts a variable errno to error when rt_sigprocmask fails. Go emits runtime.convT64 for this conversion, which can grow the stack and allocate 1. Even when an errno uses cached storage, the helper retains its stack check. The interface return was introduced in 374a11a.
Return unix.Errno directly, with zero indicating success, and update bluepill to check the concrete result. The signal-handler test and benchmark now reject setup failures instead of silently accepting them and release their mapped stacks.
Assisted-by: Codex