-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically size sigaltstk in std #113525
Dynamically size sigaltstk in std #113525
Conversation
r? @m-ou-se (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
5d3914c
to
3f928e1
Compare
/// Not all OS support hardware where this is needed. | ||
#[cfg(not(any(target_os = "linux", target_os = "android")))] | ||
fn sigstack_size() -> usize { | ||
libc::SIGSTKSZ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though "support hardware where this is needed" is confounded: on Darwin e.g. they simply define MINSIGSTKSZ and SIGSTKSZ to be values with actually decent sizes since they have a strong idea of the lower and upper bound for their hardware support.
☔ The latest upstream changes (presumably #117285) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after rebasing!
ayo! |
On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed.
3f928e1
to
9da004e
Compare
@bors r=m-ou-se |
…igstksz, r=m-ou-se Dynamically size sigaltstk in std On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed. Fixes rust-lang#107795
…kingjubilee Rollup of 13 pull requests Successful merges: - rust-lang#113525 (Dynamically size sigaltstk in std) - rust-lang#114009 (compiler: allow transmute of ZST arrays with generics) - rust-lang#116793 (Allow targets to override default codegen backend) - rust-lang#118623 (Improve std::fs::read_to_string example) - rust-lang#120504 (Vec::try_with_capacity) - rust-lang#121089 (Remove `feed_local_def_id`) - rust-lang#121280 (Implement MaybeUninit::fill{,_with,_from}) - rust-lang#122087 (Add missing background color for top-level rust documentation page and increase contrast by setting text color to black) - rust-lang#122104 (Rust is a proper name: rust → Rust) - rust-lang#122110 (Make `x t miri` respect `MIRI_TEMP`) - rust-lang#122114 (Make not finding core a fatal error) - rust-lang#122115 (Cancel parsing ever made during recovery) - rust-lang#122126 (Fix `tidy --bless` on ̶X̶e̶n̶i̶x̶ Windows) r? `@ghost` `@rustbot` modify labels: rollup
…igstksz, r=m-ou-se Dynamically size sigaltstk in std On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed. Fixes rust-lang#107795
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#112136 (Add std::ffi::c_str module) - rust-lang#113525 (Dynamically size sigaltstk in std) - rust-lang#121561 (Detect typos for compiletest test directives) - rust-lang#121685 (Fixing shellcheck comments on lvi test script) - rust-lang#121833 (Suggest correct path in include_bytes!) - rust-lang#121860 (Add a tidy check that checks whether the fluent slugs only appear once) - rust-lang#122125 (Revert back to Git-for-Windows for MinGW CI builds) - rust-lang#122221 (match lowering: define a convenient struct) - rust-lang#122251 (Add test to check unused_lifetimes don't duplicate "parameter is never used" error) - rust-lang#122264 (add myself to rotation) r? `@ghost` `@rustbot` modify labels: rollup
…igstksz, r=m-ou-se Dynamically size sigaltstk in std On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed. Fixes rust-lang#107795
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#112136 (Add std::ffi::c_str module) - rust-lang#113525 (Dynamically size sigaltstk in std) - rust-lang#121685 (Fixing shellcheck comments on lvi test script) - rust-lang#121833 (Suggest correct path in include_bytes!) - rust-lang#121860 (Add a tidy check that checks whether the fluent slugs only appear once) - rust-lang#122125 (Revert back to Git-for-Windows for MinGW CI builds) - rust-lang#122221 (match lowering: define a convenient struct) - rust-lang#122244 (fix: LocalWaker memory leak and some stability attributes) - rust-lang#122251 (Add test to check unused_lifetimes don't duplicate "parameter is never used" error) - rust-lang#122264 (add myself to rotation) r? `@ghost` `@rustbot` modify labels: rollup
…igstksz, r=m-ou-se Dynamically size sigaltstk in std On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed. Fixes rust-lang#107795
…iaskrgr Rollup of 14 pull requests Successful merges: - rust-lang#112136 (Add std::ffi::c_str module) - rust-lang#113525 (Dynamically size sigaltstk in std) - rust-lang#121567 (Avoid some interning in bootstrap) - rust-lang#121642 (Update a test to support Symbol Mangling V0) - rust-lang#121685 (Fixing shellcheck comments on lvi test script) - rust-lang#121860 (Add a tidy check that checks whether the fluent slugs only appear once) - rust-lang#121942 (std::rand: enable getrandom for dragonflybsd too.) - rust-lang#122125 (Revert back to Git-for-Windows for MinGW CI builds) - rust-lang#122221 (match lowering: define a convenient struct) - rust-lang#122244 (fix: LocalWaker memory leak and some stability attributes) - rust-lang#122251 (Add test to check unused_lifetimes don't duplicate "parameter is never used" error) - rust-lang#122264 (add myself to rotation) - rust-lang#122269 (doc/rustc: Move loongarch64-unknown-linux-musl to Tier 3) - rust-lang#122271 (Fix legacy numeric constant diag items) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#113525 - workingjubilee:handle-dynamic-minsigstksz, r=m-ou-se Dynamically size sigaltstk in std On modern Linux with Intel AMX and 1KiB matrices, Arm SVE with potentially 2KiB vectors, and RISCV Vectors with up to 16KiB vectors, we must handle dynamic signal stack sizes. We can do so unconditionally by using getauxval, but assuming it may return 0 as an answer, thus falling back to the old constant if needed. Fixes rust-lang#107795
On modern Linux with Intel AMX and 1KiB matrices,
Arm SVE with potentially 2KiB vectors,
and RISCV Vectors with up to 16KiB vectors,
we must handle dynamic signal stack sizes.
We can do so unconditionally by using getauxval,
but assuming it may return 0 as an answer,
thus falling back to the old constant if needed.
Fixes #107795