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 9 pull requests #129898

Closed
wants to merge 26 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

onur-ozkan and others added 26 commits August 26, 2024 08:28
Similar to cargo, rustc, and rustfmt, this adds the support of using custom clippy on bootstrap.
It’s designed for those who want to test their own clippy builds or avoid downloading the stage0 clippy.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
otherwise the test would build in the source root's `target` folder
it'll be easier to see and update the list: the other cmd args
can just be ignored
Naked functions can only contain inline asm, so any instrumentation
inserted by sanitizers is illegal. Don't request it.

Fixes rust-lang#129224.
custom/external clippy support for bootstrapping

Similar to cargo, rustc, and rustfmt, this adds the support of using custom clippy on bootstrap. It’s designed for those who want to test their own clippy builds or avoid downloading the stage0 clippy.

Closes rust-lang#121518
Add test to build crates used by r-a on stable

r? `@Kobzol`

I've opened other PRs for this one to work and they've landed already. I cherry-picked your commit, and added the last remaining pieces we needed I think.
…l, r=lcnr

Make decoding non-optional `LazyArray` panic if not set

Tables may be [defined](https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_metadata/src/rmeta/mod.rs#L377) as `optional:` or `defaulted:`. If optional, if we try to read a value from a key that was never encoded, we should panic. This has high value in ensuring correctness over a defaulted table, so the tradeoff is worth considering, since it signals the compiler has a buggy encode impl, rather than just defaulting to a value.

HOWEVER, `optional:` arrays were side-stepping this. So this PR fixes that, and makes `optional:` tables of `LazyArray` act like `LazyValue`, and panic if it's not assigned a value during encoding.

During this PR, I found that `deduced_param_attrs` has buggy (?? i think??) implementation where it will refuse to encode cross-crate `deduced_param_attrs` unless we're codegening, we're optimizing the library, and incremental is disabled. This seems incredibly wrong, but I don't want to fix it in this PR.
https://github.com/rust-lang/rust/blob/9649706eada1b2c68cf6504356efb058f68ad739/compiler/rustc_metadata/src/rmeta/encoder.rs#L1733-L1747
…richton

update `object` dependency to remove duplicate `wasmparser`

`@alexcrichton` in rust-lang#129762 you bumped a few wasm-related dependencies and tried to avoid duplicates.

If I understand correctly, `object` 0.36.4 wasn't yet released at the time, and therefore rust-lang#129762 ended up duplicating `wasmparser`. Now that the release happened, we can remove the duplicate.

r? `@alexcrichton`
…=compiler-errors,jieyouxu

chore: Fix typos in 'compiler' (batch 1)

Batch 1/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
…=fee1-dead

chore: Fix typos in 'compiler' (batch 2)

Batch 2/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
…=jieyouxu

chore: Fix typos in 'compiler' (batch 3)

Batch 3/3: Fixes typos in `compiler`

(See [issue](rust-lang#129874) tracking all PRs with typos fixes)
Do not request sanitizers for naked functions

Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it.

Fixes rust-lang#129224.
…lfJung

Clarify language around ptrs in slice::raw

More specifically we explicitly mention that the pointer should be non-null as a top level requirement. Nullptrs are always valid for zero sized operations, so just validity (and alignment) does not guarantee non-nullness as implied in the existing docs.

We also explicitly call out ZSTs as an additional example where perhaps unintuitively alignment and non-nullness still have to hold.

Finally we change `data` in the range functions to `start`, which seems like a typo to me.

Touches docs for rust-lang#89792

r? RalfJung
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 2, 2024
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Sep 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Contributor

bors commented Sep 2, 2024

📌 Commit 718b124 has been approved by matthiaskrgr

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 Sep 2, 2024
@bors
Copy link
Contributor

bors commented Sep 2, 2024

⌛ Testing commit 718b124 with merge 67e8365...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129152 (custom/external clippy support for bootstrapping)
 - rust-lang#129529 (Add test to build crates used by r-a on stable)
 - rust-lang#129829 (Make decoding non-optional `LazyArray` panic if not set)
 - rust-lang#129860 (update `object` dependency to remove duplicate `wasmparser`)
 - rust-lang#129875 (chore: Fix typos in 'compiler' (batch 1))
 - rust-lang#129877 (chore: Fix typos in 'compiler' (batch 2))
 - rust-lang#129878 (chore: Fix typos in 'compiler' (batch 3))
 - rust-lang#129891 (Do not request sanitizers for naked functions)
 - rust-lang#129892 (Clarify language around ptrs in slice::raw)

Failed merges:

 - rust-lang#129777 (Add `unreachable_pub`, round 4)
 - rust-lang#129868 (Remove kobzol vacation status)

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

The job x86_64-gnu-nopt failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [codegen] tests/codegen/naked-asan.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/naked-asan/naked-asan.ll" "/checkout/tests/codegen/naked-asan.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/naked-asan.rs:11:11: error: CHECK: expected string not found in input
/checkout/tests/codegen/naked-asan.rs:11:11: error: CHECK: expected string not found in input
// CHECK: define x86_intrcc void @page_fault_handler(ptr {{.*}} %0, i64 {{.*}} %1){{.*}}#[[ATTRS:[0-9]+]] {
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/naked-asan/naked-asan.ll:1:1: note: scanning from here
; ModuleID = 'naked_asan.1b8c82b2644ff93d-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/naked-asan/naked-asan.ll:15:1: note: possible intended match here
define x86_intrcc void @page_fault_handler(ptr byval([8 x i8]) align 8 %0, i64 %1) unnamed_addr #0 {

Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/naked-asan/naked-asan.ll
Check file: /checkout/tests/codegen/naked-asan.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'naked_asan.1b8c82b2644ff93d-cgu.0' 
check:11'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "naked_asan.1b8c82b2644ff93d-cgu.0" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "x86_64-unknown-linux-gnu" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
            6: $asan.module_ctor = comdat any 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
            8: @llvm.used = appending global [1 x ptr] [ptr @asan.module_ctor], section "llvm.metadata" 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            9: @___asan_globals_registered = common hidden global i64 0 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10: @__start_asan_globals = extern_weak hidden global i64 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11: @__stop_asan_globals = extern_weak hidden global i64 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           12: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @asan.module_ctor, ptr @asan.module_ctor }] 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           14: ; Function Attrs: naked nocf_check noinline nounwind nonlazybind uwtable 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           15: define x86_intrcc void @page_fault_handler(ptr byval([8 x i8]) align 8 %0, i64 %1) unnamed_addr #0 { 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'1     ?                                                                                                     possible intended match
check:11'0     ~~~~~~~
check:11'0     ~~~~~~~
           17:  call void asm sideeffect alignstack inteldialect "ud2", "~{dirflag},~{fpsr},~{flags},~{memory}"(), !srcloc !3 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           18:  unreachable 
check:11'0     ~~~~~~~~~~~~~
           19: } 
check:11'0     ~~
check:11'0     ~
check:11'0     ~
           21: declare void @__asan_before_dynamic_init(i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           23: declare void @__asan_after_dynamic_init() 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           25: declare void @__asan_register_globals(i64, i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           27: declare void @__asan_unregister_globals(i64, i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           29: declare void @__asan_register_image_globals(i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           31: declare void @__asan_unregister_image_globals(i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           33: declare void @__asan_register_elf_globals(i64, i64, i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           35: declare void @__asan_unregister_elf_globals(i64, i64, i64) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           37: declare void @__asan_init() 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
           39: ; Function Attrs: nounwind 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
           40: define internal void @asan.module_ctor() #1 comdat { 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           41:  call void @__asan_init() 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           42:  call void @__asan_version_mismatch_check_v8() 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           43:  call void @__asan_register_elf_globals(i64 ptrtoint (ptr @___asan_globals_registered to i64), i64 ptrtoint (ptr @__start_asan_globals to i64), i64 ptrtoint (ptr @__stop_asan_globals to i64)) 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           44:  ret void 
check:11'0     ~~~~~~~~~~
           45: } 
check:11'0     ~~
check:11'0     ~
check:11'0     ~
           47: declare void @__asan_version_mismatch_check_v8() 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           49: attributes #0 = { naked nocf_check noinline nounwind nonlazybind uwtable "target-cpu"="x86-64" } 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           50: attributes #1 = { nounwind } 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           52: !llvm.module.flags = !{!0, !1} 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           53: !llvm.ident = !{!2} 
check:11'0     ~~~~~~~~~~~~~~~~~~~~
check:11'0     ~
check:11'0     ~
           55: !0 = !{i32 8, !"PIC Level", i32 2} 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56: !1 = !{i32 2, !"RtLibUseGOT", i32 1} 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           57: !2 = !{!"rustc version 1.83.0-nightly (67e8365d4 2024-09-02)"} 
check:11'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58: !3 = !{i32 488} 
check:11'0     ~~~~~~~~~~~~~~~~
------------------------------------------



@bors
Copy link
Contributor

bors commented Sep 2, 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 Sep 2, 2024
@matthiaskrgr
Copy link
Member Author

amazing, an actual legit failure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.