Conversation
|
Any special-casing of Miri in the standard library requires review. cc @rust-lang/miri |
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use Why was this reviewer chosen?The reviewer was selected based on:
|
305f083 to
f8cd163
Compare
This comment has been minimized.
This comment has been minimized.
|
Could you perhaps make the changes all in the original file and then move them into separate files in a different commit? |
f8cd163 to
ae721d8
Compare
|
I added some intermediate commits to simplify the diffs. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
I should do this in multiple PRs... |
…isDenton std: split stack overflow module One of my current projects is to improve the UNIX stack overflow handling code. Outlining the inner `imp` modules out of the current 844-line module makes future work like rust-lang#162296 much easier to review. The first three commits only exist to diffing simpler, the last one contains the import adjustments.
…isDenton std: split stack overflow module One of my current projects is to improve the UNIX stack overflow handling code. Outlining the inner `imp` modules out of the current 844-line module makes future work like rust-lang#162296 much easier to review. The first three commits only exist to diffing simpler, the last one contains the import adjustments.
Rollup merge of #163210 - joboet:split_stack_overflow, r=ChrisDenton std: split stack overflow module One of my current projects is to improve the UNIX stack overflow handling code. Outlining the inner `imp` modules out of the current 844-line module makes future work like #162296 much easier to review. The first three commits only exist to diffing simpler, the last one contains the import adjustments.
|
☔ The latest upstream changes (presumably #163472) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
std: split stack overflow module One of my current projects is to improve the UNIX stack overflow handling code. Outlining the inner `imp` modules out of the current 844-line module makes future work like rust-lang/rust#162296 much easier to review. The first three commits only exist to diffing simpler, the last one contains the import adjustments.
The idea here is to split the code up into two main areas:
install_main_guardinstalls the main thread's guard pagefind_main_guard(new) finds the guard page the system has set up for the main thread (this was previously mashed in withinstall_main_guard)current_guardfinds the guard page of the current (non-main) threadSplitting the guard page stuff out will allow us to enable the soundness-critical guard page install logic even if the system doesn't support signals; and also makes it easier to work on the individual areas in parallel.
Unfortunately this isn't as simple as moving the code around: the current code caches the system's page size in a
PAGE_SIZEatomic, but that atomic is not always accessed. Thus there are some non-functional changes here in regards to how the page size is passed around. Also, since the guard page code now needs to compile on all systems, thecfg!()-based switching used to simplify cross-platform code checking would necessitate some stub implementations, so I've switched to propercfg_select!based logic.These kinds of code moves don't display nicely in the diff unfortunately, let me know if there's anything I can do to help with the review!