-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
unix: Don't override existing SIGSEGV/BUS handlers #69685
Conversation
I suspect this will want libs team FCP, but seems good to me, though I'm not super familiar with this area. |
This seems reasonable to me. (I don't especially like installing a signal handler even if there isn't already a handler, since sometimes you do want the default behavior; for instance, you might want to debug it. But as an incremental change, this seems fine.) |
@joshtriplett -- is that an |
I would suggest libs FCP. randomly, let's r? @sfackler |
@bors r+ |
📌 Commit db75c97 has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
unix: Don't override existing SIGSEGV/BUS handlers Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either. Fixes rust-lang#69524.
Rollup of 8 pull requests Successful merges: - #69631 (remove non-sysroot sources from rust-src component) - #69646 (Miri visitor: detect primitive types based on type, not layout (also, more tests)) - #69651 (Try to ensure usize marker does not get merged) - #69668 (More documentation and simplification of BTreeMap's internals) - #69685 (unix: Don't override existing SIGSEGV/BUS handlers) - #69771 (Cleanup E0390 explanation) - #69777 (Add missing ` in doc for File::with_options()) - #69812 (Refactorings to method/probe.rs and CrateId) Failed merges: r? @ghost
Failed in #69827 (comment), @bors r- |
Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either.
Sorry, missed the newly unused import in the no-op targets, should be fixed now. @bors r=sfackler |
📌 Commit 676b9bc has been approved by |
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
unix: Don't override existing SIGSEGV/BUS handlers Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either. Fixes rust-lang#69524.
unix: Don't override existing SIGSEGV/BUS handlers Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either. Fixes rust-lang#69524.
Rollup of 6 pull requests Successful merges: - #69201 (Permit attributes on 'if' expressions) - #69402 (Extend search) - #69519 ( Don't use static crt by default when build proc-macro) - #69685 (unix: Don't override existing SIGSEGV/BUS handlers) - #69762 (Ensure that validity only raises validity errors) - #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings) Failed merges: r? @ghost
unix: Don't override existing SIGSEGV/BUS handlers Although `stack_overflow::init` runs very early in the process, even before `main`, there may already be signal handlers installed for things like the address sanitizer. In that case, just leave it alone, and don't bother trying to allocate our own signal stacks either. Fixes rust-lang#69524.
Rollup of 6 pull requests Successful merges: - #69201 (Permit attributes on 'if' expressions) - #69685 (unix: Don't override existing SIGSEGV/BUS handlers) - #69762 (Ensure that validity only raises validity errors) - #69779 (librustc_codegen_llvm: Use slices in preference to 0-terminated strings) - #69801 (rustc_parse: Remove `Parser::normalized(_prev)_token`) - #69842 (Add more regression tests) Failed merges: r? @ghost
Summary: This diff upgrades fbcode platform007 and platform009 to rust 1.42.0 + a cherry-pick of rust-lang/rust#69685 for AddressSanitizer support, and xplat to plain 1.42.0. Be aware that the xplat toolchain, for which we use the official upstream releases and don't build from source, no longer supports armv7-apple-ios and armv7s-apple-ios targets as of 1.42.0. Differential Revision: D20379253 fbshipit-source-id: c98fecc35dbe077f8dd1b8c7a7bab098795ac2dd
Summary: This diff upgrades fbcode platform007 and platform009 to rust 1.42.0 + a cherry-pick of rust-lang/rust#69685 for AddressSanitizer support, and xplat to plain 1.42.0. Be aware that the xplat toolchain, for which we use the official upstream releases and don't build from source, no longer supports armv7-apple-ios and armv7s-apple-ios targets as of 1.42.0. Differential Revision: D20379253 fbshipit-source-id: c98fecc35dbe077f8dd1b8c7a7bab098795ac2dd
Such handlers can come from address sanitizers and similar. When combined with #4971, this forward-ports rust-lang/rust@676b9bc / rust-lang/rust#69685 --------- Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
Although
stack_overflow::init
runs very early in the process, evenbefore
main
, there may already be signal handlers installed for thingslike the address sanitizer. In that case, just leave it alone, and don't
bother trying to allocate our own signal stacks either.
Fixes #69524.