Skip to content
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 8 pull requests #132751

Closed
wants to merge 18 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dpaoliello and others added 18 commits September 24, 2024 10:10
…ive support

And retire the old `only-debug` directive which was ambiguous and only
for std debug assertions.
And rename local variables and field names in bootstrap from
`debug_assertions{,_std}` -> `{rustc,std}-debug-assertions` to avoid
confusion where applicable.
The channel's `Block::new` was causing a stack overflow because it held
32 item slots, instantiated on the stack before moving to `Box::new`.
The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

Fixes rust-lang#102246
Add functions to retrieve function definitions and static items from
all crates (local and external).

For external crates, add a query to retrieve the number of defs in a
foreign crate.
Set "symbol name" in raw-dylib import libraries to the decorated name

`windows-rs` received a bug report that mixing raw-dylib generated and the Windows SDK import libraries was causing linker failures: <microsoft/windows-rs#3285>

The root cause turned out to be rust-lang#124958, that is we are not including the decorated name in the import library and so the import name type is also not being correctly set.

This change modifies the generation of import libraries to set the "symbol name" to the fully decorated name and correctly marks the import as being data vs function.

Note that this also required some changes to how the symbol is named within Rust: for MSVC we now need to use the decorated name but for MinGW we still need to use partially decorated (or undecorated) name.

Fixes rust-lang#124958

Passing i686 MSVC and MinGW build: <https://github.com/rust-lang/rust/actions/runs/11000433888?pr=130586>

r? ``@ChrisDenton``
…onur-ozkan

Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support

Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.

cc ``@matthiaskrgr``

Closes rust-lang#123987.

r? bootstrap (or compiler tbh)
…iser

Fix rust-lang#131977 parens mangled in shared mut static lint suggestion

Resolves rust-lang#131977 for static mut references after discussion with
Esteban & Jieyou on [t-compiler/help](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/linting.20with.20parens.20in.20the.20HIR).

This doesn't do anything to change the underlying issue if there are other expressions that generate lint suggestions which need to be applied within parentheses.
…er-errors

[StableMIR] API to retrieve definitions from crates

Add functions to retrieve function definitions and static items from all crates (local and external).

For external crates, we're still missing items from trait implementation and primitives.

r? ``@compiler-errors:`` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
…issing_symbol_issue, r=tgross35

Compile `test_num_f128` conditionally on `reliable_f128_math` config

With rust-lang#132434 merged, our internal SGX CI started failing with:
```
05:27:34   = note: rust-lld: error: undefined symbol: fmodl
05:27:34           >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617)
05:27:34           >>>               /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8)
05:27:34           >>> did you mean: fmodf
05:27:34           >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o)
```
This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue.

cc: ``@jethrogb,`` ``@workingjubilee``
…eemdev

Initialize channel `Block`s directly on the heap

The channel's `Block::new` was causing a stack overflow because it held
32 item slots, instantiated on the stack before moving to `Box::new`.
The 32x multiplier made modestly-large item sizes untenable.

That block is now initialized directly on the heap.

Fixes rust-lang#102246
…, r=notriddle

Fix `librustdoc/scrape_examples.rs` formatting

Still working on the intra-doc link feature. This time I encountered this file and it bothered me a bit so fixing formatting. :3

r? ``@notriddle``
Update test for LLVM 20's new vector splat syntax

that was introduced in llvm/llvm-project#112548
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 7, 2024
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Nov 7, 2024

📌 Commit b173464 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2024
@bors
Copy link
Contributor

bors commented Nov 7, 2024

⌛ Testing commit b173464 with merge 61bf7ce...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 7, 2024
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name)
 - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support)
 - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion)
 - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates)
 - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config)
 - rust-lang#132738 (Initialize channel `Block`s directly on the heap)
 - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting)
 - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/std/channel-stack-overflow-issue-102246.rs stdout ----

error: test run failed!
status: exit status: 134
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/std/channel-stack-overflow-issue-102246" && RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUST_TEST_THREADS="4" "/wasmtime-v19.0.0-x86_64-linux/wasmtime" "run" "-C" "cache=n" "--dir" "." "--env" "RUSTC_BOOTSTRAP" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/std/channel-stack-overflow-issue-102246/a.wasm"
--- stderr -------------------------------
thread 'main' panicked at /rustc/FAKE_PREFIX/library/std/src/thread/mod.rs:710:29:
thread 'main' panicked at /rustc/FAKE_PREFIX/library/std/src/thread/mod.rs:710:29:
failed to spawn thread: Error { kind: Unsupported, message: "operation not supported on this platform" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to run main module `/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/std/channel-stack-overflow-issue-102246/a.wasm`
Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
    1: error while executing at wasm backtrace:
           0: 0x17f61 - a.wasm!__rust_start_panic
           1: 0x17dd2 - a.wasm!rust_panic
           2: 0x17da5 - a.wasm!std::panicking::rust_panic_with_hook::h47d82e34a178cf0a
           3: 0x17135 - a.wasm!std::panicking::begin_panic_handler::{{closure}}::h1cb6517c0c91847a
           4: 0x170a1 - a.wasm!std::sys::backtrace::__rust_end_short_backtrace::h16382cf023d4bf44
           5: 0x17739 - a.wasm!rust_begin_unwind
           6: 0x1cbca - a.wasm!core::panicking::panic_fmt::h6a4bb6d7e0fb9312
           7: 0x1e50f - a.wasm!core::result::unwrap_failed::he2764d228520a32f
           8: 0xceda - a.wasm!std::thread::spawn::h662f07e233d52b06
           9: 0x13c8c - a.wasm!channel_stack_overflow_issue_102246::main::h3fcb69216530bcc6
          10: 0x1be5 - a.wasm!core::ops::function::FnOnce::call_once::hcb8d6f270330e388
          11: 0x1309 - a.wasm!std::sys::backtrace::__rust_begin_short_backtrace::h7f8d367c580e7355
          12: 0x12c6 - a.wasm!std::rt::lang_start::{{closure}}::h0faccd8f279ec276
          13: 0x154ea - a.wasm!std::rt::lang_start_internal::h10b21d05fe119c8f
          14: 0x1271 - a.wasm!std::rt::lang_start::haf447400c7619548
          15: 0x13e2c - a.wasm!__main_void
          16:  0x509 - a.wasm!_start
    2: wasm trap: wasm `unreachable` instruction executed



failures:

@bors
Copy link
Contributor

bors commented Nov 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 8, 2024
@GuillaumeGomez GuillaumeGomez deleted the rollup-wcwj0kc branch November 8, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing parenthesis in static_mut_refs diagnostic suggestion