-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 6 pull requests #133905
Rollup of 6 pull requests #133905
Conversation
…vaarg for xtensa. LLVM does not include an implementation of the va_arg instruction for Xtensa. From what I understand, this is a conscious decision and instead language frontends are encouraged to implement it themselves. The rationale seems to be that loading values correctly requires language and ABI-specific knowledge that LLVM lacks. This is true of most architectures, and rustc already provides implementation for a number of them. This commit extends the support to include Xtensa. See https://lists.llvm.org/pipermail/llvm-dev/2017-August/116337.html for some discussion on the topic. Unfortunately there does not seem to be a reference document for the semantics of the va_list and va_arg on Xtensa. The most reliable source is the GCC implementation, which this commit tries to follow. Clang also provides its own compatible implementation. This was tested for all the types that rustc allows in variadics. Co-authored-by: Brian Tarricone <[email protected]> Co-authored-by: Jonathan Bastien-Filiatrault <[email protected]> Co-authored-by: Paul Lietar <[email protected]>
The existing comments were misleading, confusing, and wrong. Take this comment for example: ``` // Any frames between `__rust_begin_short_backtrace` and `__rust_end_short_backtrace` // are omitted from the backtrace in short mode, `__rust_end_short_backtrace` will be // called before the panic hook, so we won't ignore any frames if there is no // invoke of `__rust_begin_short_backtrace`. ``` this is just wrong. here is an example (full) backtrace: ``` Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s Running `/home/jyn/.local/lib/cargo/target/debug/example` called `Option::unwrap()` on a `None` value stack backtrace: 0: 0x56499698c595 - std::backtrace_rs::backtrace::libunwind::trace::h5ef2cc16e9a7415a 1: 0x56499698c595 - std::backtrace_rs::backtrace::trace_unsynchronized::h9b5e016e9075f714 2: 0x56499698c595 - std::sys_common::backtrace::_print_fmt::h2f62c7f9ff224e93 3: 0x56499698c595 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbe51682735731910 4: 0x5649969aa26b - core::fmt::rt::Argument::fmt::h1994ab2b310d665e 5: 0x5649969aa26b - core::fmt::write::hade58a36d63468d7 6: 0x56499698a43f - std::io::Write::write_fmt::h16145587d801a9ab 7: 0x56499698c36e - std::sys_common::backtrace::_print::ha8082e56201dadb4 8: 0x56499698c36e - std::sys_common::backtrace::print::he30f96b4e7f6cbfd 9: 0x56499698d709 - std::panicking::default_hook::{{closure}}::hf0801f6b18a968d3 10: 0x56499698d4ac - std::panicking::default_hook::hd2defec7eda5aeb0 11: 0x56499698dc31 - std::panicking::rust_panic_with_hook::hde93283600065c53 12: 0x56499698daf3 - std::panicking::begin_panic_handler::{{closure}}::h5e151adbdb7ec0c1 13: 0x56499698ca59 - std::sys_common::backtrace::__rust_end_short_backtrace::he36a1407e0f77700 14: 0x56499698d7d4 - rust_begin_unwind 15: 0x5649969a9503 - core::panicking::panic_fmt::h2380d41365f95412 16: 0x5649969a958c - core::panicking::panic::h38cf8db80e8c6e67 17: 0x5649969a93e9 - core::option::unwrap_failed::he72696e53ff29a05 18: 0x5649969722b6 - core::option::Option<T>::unwrap::hb574dc0dc1703062 19: 0x5649969722b6 - example::main::h7a867aafacd93d75 20: 0x5649969721db - core::ops::function::FnOnce::call_once::h734f99a5e57291b7 21: 0x56499697226e - std::sys_common::backtrace::__rust_begin_short_backtrace::h02f5d58c351c4756 22: 0x564996972241 - std::rt::lang_start::{{closure}}::h8b134fe2c31a4355 23: 0x564996988662 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h88d7bb571ee2aaf4 24: 0x564996988662 - std::panicking::try::do_call::hfb78dfb6599c871d 25: 0x564996988662 - std::panicking::try::habd041c8c4c8e50c 27: 0x564996988662 - std::rt::lang_start_internal::{{closure}}::h227591a6f9c0879e 28: 0x564996988662 - std::panicking::try::do_call::h3c5878333c38916a 29: 0x564996988662 - std::panicking::try::h5af7b3a127cdae70 31: 0x564996988662 - std::rt::lang_start_internal::hbc85e809eeace0dd 32: 0x56499697221a - std::rt::lang_start::ha1eb16922c9cb224 33: 0x5649969722ee - main 34: 0x7f031962a1ca - __libc_start_call_main 35: 0x7f031962a28b - __libc_start_main_impl 36: 0x5649969720a5 - _start 37: 0x0 - <unknown> ``` note particularly frames 13-21, from start_backtrace to end_backtrace. with PrintFmt::Short, these are the *only* frames that are printed; i.e. we are doing the exact opposite of the comment.
Nested job objects aren't supported on Windows 7 but we've long since moved on from that.
Signed-off-by: onur-ozkan <[email protected]>
…ilee Teach rustc about the Xtensa VaListImpl Following on from the target Xtensa target PRs (rust-lang#125141, rust-lang#126380), this PR teaches rustc about the structure of the VA list on the Xtensa arch, as well as adding the required lowering to be able to actually use it.
…r=workingjubilee clarify simd_relaxed_fma non-determinism This is the safer spec in the sense that it is more likely to be satisfied by the backend -- and if people are okay with a non-deterministic result, I assume they don't care whether it's the same choice across all lanes or not? Cc ``@calebzulawski`` ``@workingjubilee``
Fix "std" support status of some tier 3 targets rust-lang#127265 marked targets with empty "std" support status as no-std targets in target-spec metadata: > * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build However, this is not accurate because "std" support status has a marker indicating that it is a no-std target. (empty status is just invalid.) https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 > The `std` column in the table below has the following meanings: > > * ✓ indicates the full standard library is available. > * \* indicates the target only supports [`no_std`] development. > * ? indicates the standard library support is unknown or a work-in-progress. > > [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html This PR fixes the status of targets whose "std" support status is currently set to empty and update target-spec metadata. The new status is set based on the following criteria: - Set to ✓ for targets that I regularly check in [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain) that the `cargo test` works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl) - Targets where `cargo run` works but `cargo test` does not work tend to have incomplete std support (e.g., riscv32 musl taiki-e/rust-cross-toolchain@f3068b6), so I included them in the group below that means “work in progress” rather than in this group. - Set powerpc64le FreeBSD to ✓ on both std and host_tools, because the [Rust package](https://www.freshports.org/lang/rust/) is available. - Set to ? (which means "unknown" or “work in progress”) for all other affected targets because these are Linux, Android, FreeBSD, or Fuchsia, all of which are operating systems that support std if properly supported. r? Noratrieb cc ``@harmou01``
Improve comments for the default backtrace printer The existing comments were misleading, confusing, and outdated. Take this comment for example: ``` // Any frames between `__rust_begin_short_backtrace` and `__rust_end_short_backtrace` // are omitted from the backtrace in short mode, `__rust_end_short_backtrace` will be // called before the panic hook, so we won't ignore any frames if there is no // invoke of `__rust_begin_short_backtrace`. ``` this is just wrong. here is an example (full) backtrace: <details> ``` Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s Running `/home/jyn/.local/lib/cargo/target/debug/example` called `Option::unwrap()` on a `None` value stack backtrace: 0: 0x56499698c595 - std::backtrace_rs::backtrace::libunwind::trace::h5ef2cc16e9a7415a 1: 0x56499698c595 - std::backtrace_rs::backtrace::trace_unsynchronized::h9b5e016e9075f714 2: 0x56499698c595 - std::sys_common::backtrace::_print_fmt::h2f62c7f9ff224e93 3: 0x56499698c595 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbe51682735731910 4: 0x5649969aa26b - core::fmt::rt::Argument::fmt::h1994ab2b310d665e 5: 0x5649969aa26b - core::fmt::write::hade58a36d63468d7 6: 0x56499698a43f - std::io::Write::write_fmt::h16145587d801a9ab 7: 0x56499698c36e - std::sys_common::backtrace::_print::ha8082e56201dadb4 8: 0x56499698c36e - std::sys_common::backtrace::print::he30f96b4e7f6cbfd 9: 0x56499698d709 - std::panicking::default_hook::{{closure}}::hf0801f6b18a968d3 10: 0x56499698d4ac - std::panicking::default_hook::hd2defec7eda5aeb0 11: 0x56499698dc31 - std::panicking::rust_panic_with_hook::hde93283600065c53 12: 0x56499698daf3 - std::panicking::begin_panic_handler::{{closure}}::h5e151adbdb7ec0c1 13: 0x56499698ca59 - std::sys_common::backtrace::__rust_end_short_backtrace::he36a1407e0f77700 14: 0x56499698d7d4 - rust_begin_unwind 15: 0x5649969a9503 - core::panicking::panic_fmt::h2380d41365f95412 16: 0x5649969a958c - core::panicking::panic::h38cf8db80e8c6e67 17: 0x5649969a93e9 - core::option::unwrap_failed::he72696e53ff29a05 18: 0x5649969722b6 - core::option::Option<T>::unwrap::hb574dc0dc1703062 19: 0x5649969722b6 - example::main::h7a867aafacd93d75 20: 0x5649969721db - core::ops::function::FnOnce::call_once::h734f99a5e57291b7 21: 0x56499697226e - std::sys_common::backtrace::__rust_begin_short_backtrace::h02f5d58c351c4756 22: 0x564996972241 - std::rt::lang_start::{{closure}}::h8b134fe2c31a4355 23: 0x564996988662 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h88d7bb571ee2aaf4 24: 0x564996988662 - std::panicking::try::do_call::hfb78dfb6599c871d 25: 0x564996988662 - std::panicking::try::habd041c8c4c8e50c 27: 0x564996988662 - std::rt::lang_start_internal::{{closure}}::h227591a6f9c0879e 28: 0x564996988662 - std::panicking::try::do_call::h3c5878333c38916a 29: 0x564996988662 - std::panicking::try::h5af7b3a127cdae70 31: 0x564996988662 - std::rt::lang_start_internal::hbc85e809eeace0dd 32: 0x56499697221a - std::rt::lang_start::ha1eb16922c9cb224 33: 0x5649969722ee - main 34: 0x7f031962a1ca - __libc_start_call_main 35: 0x7f031962a28b - __libc_start_main_impl 36: 0x5649969720a5 - _start 37: 0x0 - <unknown> ``` </details> note particularly frames 13-21, from start_backtrace to end_backtrace. with PrintFmt::Short, these are the *only* frames that are printed; i.e. we are doing the exact opposite of the comment. r? ``@saethlin``
Improve bootstrap job objects This attempts to fix a few comments on bootstrap job objects. I also fixed an issue where if duplicating the job object handle into the python process failed, it would close the job object. This would then result in the job object closing all attached processes, which at that point includes the current process. The fix is to simply never close the job object handle at any point after the current process is assigned to it.
…-sources, r=jieyouxu skip `setup::Hook` on non-git sources Running `setup::Hook` (with `x setup`) leads tarball sources to panic and this PR resolves that problem by skipping `Hook` step on non-git sources.
@bors r+ rollup=never p=6 |
Rollup of 6 pull requests Successful merges: - rust-lang#127565 (Teach rustc about the Xtensa VaListImpl) - rust-lang#133844 (clarify simd_relaxed_fma non-determinism) - rust-lang#133867 (Fix "std" support status of some tier 3 targets) - rust-lang#133882 (Improve comments for the default backtrace printer) - rust-lang#133888 (Improve bootstrap job objects) - rust-lang#133898 (skip `setup::Hook` on non-git sources) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry (msvc) |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 0e98766a54 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (c94848c): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -2.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.918s -> 770.008s (0.01%) |
This was a spurious |
Successful merges:
setup::Hook
on non-git sources #133898 (skipsetup::Hook
on non-git sources)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup