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 #127991

Closed
wants to merge 30 commits into from
Closed

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 30 commits July 10, 2024 20:25
This comment has two problems:

- It is very long, making the flow of the enclosing method hard to follow.
- It starts by talking about an `autoref` flag that hasn't existed since rust-lang#59114.

This PR therefore replaces the long inline comment with a revised doc comment
on `bind_matched_candidate_for_guard`, and some shorter inline comments.

For readers who want more historical context, we also link to the PR that added
the old comment, and the PR that removed the `autoref` flag.
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Use a custom simple_text_output protocol to capture output.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Implement stderr support in similar fashion.

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Only tested in 2 levels right now. Need args support for 3 levels

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Also fix stdio inherit

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
- Update system table crc32
- Fix unsound use of Box
- Free exit data
- Code improvements
- Introduce OwnedTable
- Update r-efi to latest version
- Use extended_varargs_abi_support for
  install_multiple_protocol_interfaces and
  uninstall_multiple_protocol_interfaces
- Fix comments
- Stub out args implementation

Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
This commit updates the support for the `wasm-component-ld` tool
from rust-lang#126967 to conditionally build it rather than unconditionally
building it when LLD is enabled. This support is disabled by default and
can be enabled by one of two means:

* the `extended` field in `config.toml` which dist builders use to build
  a complete set of tools for each host platform.
* a `"wasm-component-ld"` entry in the `tools` section of `config.toml`.

Neither of these are enabled by default meaning that most local builds
will likely not have this new tool built. Dist builders should still,
however, build the tool.
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing).  Inlining format args prevents accidental `&` misuse.
Add Process support for UEFI

UEFI does not have an actual process. However, it does provide methods to launch and execute another UEFI image. Having process support is important since it is possible to run rust test suit using `Command::output` and is the first step towards being able to run it for UEFI.

Here is an overview of how the support is implemented.

- We create a copy of the SystemTable. This is required since at least OVMF seems to crash if the original system table is modified.
- Stdout and Stderr pipe works by registering a new `simple_text_output` Protocol and pointing the child system table to use those.
- `Stdio::Inherit` just points the console to the current running image console which seems to work with even 3 levels of process.
- `spawn` is left unimplemented since it does not make sense for UEFI architecture. Additionally, since rust-lang#105458 was merged, the `spawn` and `output` implementations are completely independent.
Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `run-make` tests to rmake

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Please try:

try-job: x86_64-msvc
Replace a long inline "autoref" comment with method docs

This comment has two problems:

- It is very long, making the flow of the enclosing method hard to follow.
- It starts by talking about an `autoref` flag that hasn't existed since rust-lang#59114.
  - This makes it hard to trust that the information in the comment is accurate or relevant, even though much of it still seems to be true.

This PR therefore replaces the long inline comment with a revised doc comment on `bind_matched_candidate_for_guard`, and some shorter inline comments.

For readers who want more historical context, we also link to the PR that added the old comment, and the PR that removed the `autoref` flag.
…sion-rmake, r=jieyouxu

Migrate `crate-hash-rustc-version` to `rmake`

Part of rust-lang#121876.

r? `@jieyouxu`

try-job: x86_64-gnu-llvm-18
try-job: dist-x86_64-linux
…t-ld-by-default, r=onur-ozkan

Conditionally build `wasm-component-ld`

This commit updates the support for the `wasm-component-ld` tool from rust-lang#126967 to conditionally build rather than unconditionally building it when LLD is enabled. This support is disabled by default and can be enabled by one of two means:

* the `extended` field in `config.toml` which dist builders use to build a complete set of tools for each host platform.
* a `"wasm-component-ld"` entry in the `tools` section of `config.toml`.

Neither of these are enabled by default meaning that most local builds will likely not have this new tool built. Dist builders should still, however, build the tool.
…joboet

Safely enforce thread name requirements

The requirements for the thread name to be both UTF-8 and null terminated are easily enforced by a wrapper type so lets do that. The fact this used to be just a bare `CString` has tripped me up before because it was entirely safe to use a non UTF-8 `CString`.
…rors

fixes panic error `index out of bounds` in conflicting error

fixes rust-lang#127915
Avoid ref when using format! in compiler

Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing).  Inlining format args prevents accidental `&` misuse.

See also rust-lang/rust-clippy#10851
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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. rollup A PR which is a rollup labels Jul 19, 2024
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never

We have a lot of rollup=never in the queue, so I'll let it pick up one more before bumping this rollup's priority

@bors
Copy link
Contributor

bors commented Jul 19, 2024

📌 Commit d2d24cf has been approved by tgross35

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 Jul 19, 2024
@tgross35
Copy link
Contributor Author

@bors p=8

@bors
Copy link
Contributor

bors commented Jul 20, 2024

⌛ Testing commit d2d24cf with merge ead9d17...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 20, 2024
Rollup of 8 pull requests

Successful merges:

 - rust-lang#123196 (Add Process support for UEFI)
 - rust-lang#127523 (Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `run-make` tests to rmake)
 - rust-lang#127556 (Replace a long inline "autoref" comment with method docs)
 - rust-lang#127693 (Migrate `crate-hash-rustc-version` to `rmake`)
 - rust-lang#127866 (Conditionally build `wasm-component-ld` )
 - rust-lang#127918 (Safely enforce thread name requirements)
 - rust-lang#127948 (fixes panic error `index out of bounds` in conflicting error)
 - rust-lang#127980 (Avoid ref when using format! in compiler)

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

The job i686-mingw failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests\run-make\panic-abort-eh_frame stdout ----

error: rmake recipe failed to complete
status: exit code: 101
command: "C:\\a\\rust\\rust\\build\\i686-pc-windows-gnu\\test\\run-make\\panic-abort-eh_frame\\panic-abort-eh_frame\\rmake.exe"
--- stderr -------------------------------
--- stderr -------------------------------
=== HAYSTACK ===
foo.o: file format coff-i386

.debug_frame contents:

---
  Data alignment factor: -4
  Return address column: 8
  Augmentation data:     00

  DW_CFA_def_cfa: reg4 +4
  DW_CFA_offset: reg8 -4
  DW_CFA_nop:
  DW_CFA_nop:

  CFA=reg4+4: reg8=[CFA-4]

00000018 00000018 0000001c FDE cie=00000000 pc=00000000...00000022
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x0: CFA=reg4+4: reg8=[CFA-4]
  0x1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000034 00000018 00000038 FDE cie=00000000 pc=00000030...00000044
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x30: CFA=reg4+4: reg8=[CFA-4]
  0x31: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x33: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000050 00000018 00000054 FDE cie=00000000 pc=00000050...000000ab
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x50: CFA=reg4+4: reg8=[CFA-4]
  0x51: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x53: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

0000006c 00000018 00000070 FDE cie=00000000 pc=000000b0...000000c2
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0xb0: CFA=reg4+4: reg8=[CFA-4]
  0xb1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0xb3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000088 00000018 0000008c FDE cie=00000000 pc=000000d0...000000eb
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0xd0: CFA=reg4+4: reg8=[CFA-4]
  0xd1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0xd3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

000000a4 00000018 000000a8 FDE cie=00000000 pc=000000f0...000000fa
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0xf0: CFA=reg4+4: reg8=[CFA-4]
  0xf1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0xf3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

000000c0 00000018 000000c4 FDE cie=00000000 pc=00000100...00000105
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x100: CFA=reg4+4: reg8=[CFA-4]
  0x101: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x103: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

000000dc 00000018 000000e0 FDE cie=00000000 pc=00000110...00000117
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x110: CFA=reg4+4: reg8=[CFA-4]
  0x111: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x113: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

000000f8 00000018 000000fc FDE cie=00000000 pc=00000120...00000158
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x120: CFA=reg4+4: reg8=[CFA-4]
  0x121: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x123: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000114 00000018 00000118 FDE cie=00000000 pc=00000160...00000173
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x160: CFA=reg4+4: reg8=[CFA-4]
  0x161: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x163: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000130 00000020 00000134 FDE cie=00000000 pc=00000180...00000274
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_advance_loc: 39
  DW_CFA_def_cfa: reg4 +4
  DW_CFA_restore: reg5
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa: reg5 +8
  DW_CFA_offset: reg5 -8

  0x180: CFA=reg4+4: reg8=[CFA-4]
  0x181: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x183: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]
  0x1aa: CFA=reg4+4: reg8=[CFA-4]
  0x1ac: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000154 00000018 00000158 FDE cie=00000000 pc=00000280...00000292
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x280: CFA=reg4+4: reg8=[CFA-4]
  0x281: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x283: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

00000170 00000018 00000174 FDE cie=00000000 pc=000002a0...000002e0
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x2a0: CFA=reg4+4: reg8=[CFA-4]
  0x2a1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x2a3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

0000018c 00000018 00000190 FDE cie=00000000 pc=000002e0...0000035c
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x2e0: CFA=reg4+4: reg8=[CFA-4]
  0x2e1: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x2e3: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

000001a8 00000018 000001ac FDE cie=00000000 pc=00000360...00000390
  Format:       DWARF32
  DW_CFA_advance_loc: 1
  DW_CFA_def_cfa_offset: +8
  DW_CFA_offset: reg5 -8
  DW_CFA_advance_loc: 2
  DW_CFA_def_cfa_register: reg5
  DW_CFA_nop:
  DW_CFA_nop:
  DW_CFA_nop:

  0x360: CFA=reg4+4: reg8=[CFA-4]
  0x361: CFA=reg4+8: reg5=[CFA-8], reg8=[CFA-4]
  0x363: CFA=reg5+8: reg5=[CFA-8], reg8=[CFA-4]

=== NEEDLE ===
DW_CFA
thread 'main' panicked at C:\a\rust\rust\tests\run-make\panic-abort-eh_frame\rmake.rs:19:63:
thread 'main' panicked at C:\a\rust\rust\tests\run-make\panic-abort-eh_frame\rmake.rs:19:63:
needle was unexpectedly found in haystack
------------------------------------------



@bors
Copy link
Contributor

bors commented Jul 20, 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 Jul 20, 2024
@tgross35 tgross35 closed this Jul 20, 2024
@tgross35 tgross35 deleted the rollup-ccfammj branch July 20, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.