Repository navigation
Conversation
Collaborator
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
JohnTitor
reviewed
Nov 24, 2026
| // SAFETY: this is always safe to call. | ||
| let stackaddr = if unsafe { libc::pthread_main_np() } == 1 { | ||
| // main thread | ||
| stack_ptr.addr() - current_stack.ss_size + PAGE_SIZE.load(Ordering::Relaxed) |
Member
There was a problem hiding this comment.
PAGE_SIZE is currently only on handler_signal.rs so this could fail to build.
This branch has not been deployed
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.
Setting up a guard page on the main thread is different from setting up a signal handler to report stack overflows. It cannot be skipped under
panic = "immediate-abort"and might be necessary even if the system does not support signal handling (cf. #125390).In preparation for properly separating guard page setup and finding, this PR moves the guard page logic to a different module than
handler_signal. This necessitates passing the system's page size through an argument in a few places since thestaticwhere the value returned bysysconfis cached is no longer reachable, see the second commit for that adjustment (and the import adjustment).