Skip to content

Rollup of 16 pull requests - #161359

Closed
JonathanBrouwer wants to merge 42 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-qbgqINh
Closed

Rollup of 16 pull requests#161359
JonathanBrouwer wants to merge 42 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-qbgqINh

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 30 commits August 5, 2026 19:09
This patch implements Rust's equivalent of Clang's function pointer type
discriminator computation used in pointer authentication. Compatibility
with Clang is a primary goal. The discriminator produced for a given
external "C" function type must match the value computed by Clang so
that function pointers can be exchanged safely between Rust and C code
while preserving pointer authentication semantics.

The implementation mirrors Clang's behavior in
`ASTContext::encodeTypeForFunctionPointerAuth`, ensuring that identical
C-compatible function types produce identical discriminators. See:
<https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3>.
To `QuerySystem`, next to `query_vtables`. It's a better spot for it.
`MCOptions` is the name of the variable commonly used for instances of
`MCTargetOptions`. Use the proper type name instead.
…parent]` is applied

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
This commit moves the eight cache fields in `GlobalCtxt` into a single
type, just to provide some logical grouping and to reduce the number of
fields within `GlobalCtxt`.
It makes sense next to `QuerySystem::side_effects`, and this enables the
use of `DepNodeIndex` for the values instead of the type-erased `u32`.
…=davidtwco

[PAC] Encoder and hash (1/8)

This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.

The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.

---

This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)

---

Useful links:
* Previous PAC work:
  * `pauthtest` introduction: rust-lang#155722
  * Library support follow up: rust-lang#156548
  * Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
…loc-reenter-3, r=nia-e

Ensure TLS accesses don't call the global allocator through panic (part 3)

Follow-up to rust-lang#160976

Missed TLS code that is in a completely different module for some reason

cc rust-lang#160930
…anups, r=Zalathar

Some `GlobalCtxt`/`Session` cleanups

Details in individual commits.

r? @Zalathar
Update the `rustc-perf` submodule

To bring in rust-lang/rustc-perf#2537, so that we unblock rust-lang#160619.

r? lcnr
@rustbot rustbot added T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Aug 19, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple-1,aarch64-apple-2,x86_64-mingw-1,i686-msvc-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7381a90 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 7381a90 with merge a4309d2

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/32264200254

rust-bors Bot pushed a commit that referenced this pull request Aug 19, 2026
Rollup of 16 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple-1
try-job: aarch64-apple-2
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: i686-msvc-2
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 19, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #159071 ([PAC] Encoder and hash (1/8))
 - #161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
 - #161332 (Some `GlobalCtxt`/`Session` cleanups)
 - #161344 (Update the `rustc-perf` submodule)
 - #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
 - #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
 - #160876 (remove unwrap from write_mir_fn_graphviz)
 - #160927 (Enhance EII UI tests)
 - #161070 (fix arm homogeneous aggregate ABI)
 - #161236 (Download auto jobs in citool in parallel)
 - #161254 (Reserve capacity for 3% anon nodes)
 - #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
 - #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
 - #161299 (Remove a bunch of unnecessary explicit lifetimes)
 - #161307 (make ARM maintainers pingable)
 - #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: WARNING: Failed: ar  --plugin /rustroot/libexec/gcc/x86_64-pc-linux-gnu/9.5.0/liblto_plugin.so rc
ar: no operation specified
configure: WARNING: Failed: ar  --plugin /rustroot/libexec/gcc/x86_64-pc-linux-gnu/9.5.0/liblto_plugin.so rc
configure: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok
/tmp/ccv2WQkU.s: Assembler messages:
/tmp/ccv2WQkU.s:9: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:87: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:175: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:257: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:387: Error: no such instruction: `endbr64'
make[2]: *** [concat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-build-libiberty] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
Bootstrap failed while executing `dist gcc-dev gcc`
Currently active steps:
dist::GccDev { target: x86_64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/dist.rs:3188
gcc::Gcc { target_pair: GccTargetPair { host: x86_64-unknown-linux-gnu, target: x86_64-unknown-linux-gnu } } at src/bootstrap/src/core/build_steps/dist.rs:3194
Command `make --silent -j32 [workdir=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/build]` failed with exit code 2
Created at: src/bootstrap/src/core/build_steps/gcc.rs:354:5
Executed at: src/bootstrap/src/core/build_steps/gcc.rs:358:10

--- STDOUT vvv
mkdir -p -- ./libiberty
mkdir -p -- ./fixincludes
mkdir -p -- ./gettext
---
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
=== configuring in intl (/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/build/gettext/intl)
configure: running /bin/sh /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/src/gettext/gettext-runtime/intl/configure --disable-option-checking '--prefix=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/install'  '--enable-host-shared' '--enable-checking=release' '--disable-bootstrap' '--disable-multilib' '--with-bugurl=https://github.com/rust-lang/gcc/' '--enable-languages=c,jit,lto' '--program-transform-name=s,y,y,' '--disable-year2038' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--target=x86_64-pc-linux-gnu' '--disable-shared' '--disable-threads' '--disable-java' '--disable-csharp' '--with-pic' '--disable-libasprintf' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'target_alias=x86_64-pc-linux-gnu' 'CC=sccache /rustroot/bin/cc' 'CFLAGS=-O2 -g0    ' 'LDFLAGS=-static-libstdc++ -static-libgcc ' 'CXX=sccache /rustroot/bin/c++' 'CXXFLAGS=-O2 -g0    ' --cache-file=.././config.cache --srcdir=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/src/gettext/gettext-runtime/intl
configure: loading cache .././config.cache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) gawk
---
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
=== configuring in libasprintf (/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/build/gettext/libasprintf)
configure: running /bin/sh /checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/src/gettext/gettext-runtime/libasprintf/configure --disable-option-checking '--prefix=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/install'  '--enable-host-shared' '--enable-checking=release' '--disable-bootstrap' '--disable-multilib' '--with-bugurl=https://github.com/rust-lang/gcc/' '--enable-languages=c,jit,lto' '--program-transform-name=s,y,y,' '--disable-year2038' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--target=x86_64-pc-linux-gnu' '--disable-shared' '--disable-threads' '--disable-java' '--disable-csharp' '--with-pic' '--disable-libasprintf' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'target_alias=x86_64-pc-linux-gnu' 'CC=sccache /rustroot/bin/cc' 'CFLAGS=-O2 -g0    ' 'LDFLAGS=-static-libstdc++ -static-libgcc ' 'CXX=sccache /rustroot/bin/c++' 'CXXFLAGS=-O2 -g0    ' --cache-file=.././config.cache --srcdir=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/src/gettext/gettext-runtime/libasprintf
configure: loading cache .././config.cache
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) gawk
---
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:00:45
  local time: Wed Aug 19 16:40:37 UTC 2026
  network time: Wed, 19 Aug 2026 16:40:39 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors rust-bors Bot 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 Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 520e21b failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

I think the real error is

/tmp/ccv2WQkU.s: Assembler messages:
/tmp/ccv2WQkU.s:9: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:87: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:175: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:257: Error: no such instruction: `endbr64'
/tmp/ccv2WQkU.s:387: Error: no such instruction: `endbr64'
make[2]: *** [concat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-build-libiberty] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
Bootstrap failed while executing `dist gcc-dev gcc`
Currently active steps:
dist::GccDev { target: x86_64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/dist.rs:3188
gcc::Gcc { target_pair: GccTargetPair { host: x86_64-unknown-linux-gnu, target: x86_64-unknown-linux-gnu } } at src/bootstrap/src/core/build_steps/dist.rs:3194
Command `make --silent -j32 [workdir=/checkout/obj/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/build]` failed with exit code 2
Created at: src/bootstrap/src/core/build_steps/gcc.rs:354:5
Executed at: src/bootstrap/src/core/build_steps/gcc.rs:358:10

What caused this tho?...

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors treeclosed=10 To keep an eye on #t-infra > GCC broken tests passed auto CI @ 💬

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Tree closed for PRs with priority less than 10.

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 19, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2026
@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

💥 Test timed out after 21600s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc O-SGX Target: SGX PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.