Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 6, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

folkertdev and others added 18 commits October 16, 2025 11:03
document that the detect macros expand to `true` when the feature is statically enabled
Some sanitizers are part of a system's ABI, like the shadow call stack
on Aarch64 and RISC-V Fuchsia. Typically ABI options have other
spellings, but LLVM has, for historical reasons, marked this as a
sanitizer instead of an alternate ABI option. As a result, Fuchsia
targets may not be compiled against the correct ABI unless this option
is set. This hasn't caused correctness problems, since the backend
reserves the SCS register, and thus preserves its value. But this is an
issue for unwinding, as the SCS will not be an array of PCs describing
the call complete call chain, and will have gaps from callers that don't
use the correct ABI.

In the long term, I'd like to see all the sanitizer configs that all
frontends copy from clang moved into llvm's libFrontend, and exposed so
that frontend consumers can use a small set of simple APIs to use
sanitizers in a consistent way across the LLVM ecosystem, but that work
is not yet ready today.
While looking at the pretty-printers, I found a few minor oddities in
StdNonZeroNumberProvider.

First, gdb.Type.fields() already returns a sequence, so there's no
need to call list().

Second, it's more idiomatic for the (somewhat misnamed) to_string
method to simply return the underlying gdb.Value.  This also lets gdb
apply whatever formats were passed to `print`, as the new test shows.

Third, there's no need to use the field's name when looking up a field
in a value, the gdb.Field itself can be used.
gdb doesn't have a way to know when an object hasn't yet been
initialized, and in this case, if a pretty-printer returns an absurd
number of children, this can result in apparent hangs in some modes.
This came up specifically with DAP, see this bug report:

    https://sourceware.org/bugzilla/show_bug.cgi?id=33594

This patch (mostly) addresses this potential issue in the Rust
pretty-printers, by adding 'num_children' methods.  In particular a
method like this is added when the number of children is variable and
also relatively easy to compute.  (I.e., I didn't attempt the btree
printers.)

Supplying num_children is good for DAP regardless of the
initialization problem, because DAP requires a count of child objects
and this is more efficient than enumerating the children, which is
gdb's fallback approach.
The link had a stray character that generated an invalid link.
…anieu

Make named asm_labels lint not trigger on hexagon register spans

Fixes #143021
Add default sanitizers to TargetOptions

Some sanitizers are part of a system's ABI, like the shadow call stack on Aarch64 and RISC-V Fuchsia. Typically ABI options have other spellings, but LLVM has, for historical reasons, marked this as a sanitizer instead of an alternate ABI option. As a result, Fuchsia targets may not be compiled against the correct ABI unless this option is set. This hasn't caused correctness problems, since the backend reserves the SCS register, and thus preserves its value. But this is an issue for unwinding, as the SCS will not be an array of PCs describing the call complete call chain, and will have gaps from callers that don't use the correct ABI.

In the long term, I'd like to see all the sanitizer configs that all frontends copy from clang moved into llvm's libFrontend, and exposed so that frontend consumers can use a small set of simple APIs to use sanitizers in a consistent way across the LLVM ecosystem, but that work is not yet ready today.
…anieu

std-detect: improve detect macro docs

Specifically, document that the detect macros expand to `true` when the feature is statically enabled.

Now that we have a bunch of these macros, perhaps we should streamline further how they are documented?

r? ``@Amanieu``
…ing, r=lolbinarycat

[rustdoc] Gracefully handle error in case we cannot run the compiler in doctests

Fixes bug reported in [this comment](#102981 (comment)).

r? ``@lolbinarycat``
Minor fixes to StdNonZeroNumberProvider for gdb

While looking at the pretty-printers, I found a few minor oddities in StdNonZeroNumberProvider.

First, gdb.Type.fields() already returns a sequence, so there's no need to call list().

Second, it's more idiomatic for the (somewhat misnamed) to_string method to simply return the underlying gdb.Value.  This also lets gdb apply whatever formats were passed to `print`, as the new test shows.

Third, there's no need to use the field's name when looking up a field in a value, the gdb.Field itself can be used.
Add num_children method to some gdb pretty-printers

gdb doesn't have a way to know when an object hasn't yet been initialized, and in this case, if a pretty-printer returns an absurd number of children, this can result in apparent hangs in some modes. This came up specifically with DAP, see this bug report:

    https://sourceware.org/bugzilla/show_bug.cgi?id=33594

This patch (mostly) addresses this potential issue in the Rust pretty-printers, by adding 'num_children' methods.  In particular a method like this is added when the number of children is variable and also relatively easy to compute.  (I.e., I didn't attempt the btree printers.)

Supplying num_children is good for DAP regardless of the initialization problem, because DAP requires a count of child objects and this is more efficient than enumerating the children, which is gdb's fallback approach.
Fix broken qemu-cskyv2 link

The link had a stray character that generated an invalid link.
Rollup of 7 pull requests

Successful merges:

 - #143037 (Make named asm_labels lint not trigger on hexagon register spans)
 - #147043 (Add default sanitizers to TargetOptions)
 - #147586 (std-detect: improve detect macro docs)
 - #147912 ([rustdoc] Gracefully handle error in case we cannot run the compiler in doctests)
 - #148540 (Minor fixes to StdNonZeroNumberProvider for gdb)
 - #148541 (Add num_children method to some gdb pretty-printers)
 - #148549 (Fix broken qemu-cskyv2 link)

Failed merges:

 - #147935 (Add LLVM realtime sanitizer)

r? `@ghost`
`@rustbot` modify labels: rollup
@pull pull bot locked and limited conversation to collaborators Nov 6, 2025
@pull pull bot added the ⤵️ pull label Nov 6, 2025
@pull pull bot merged commit 642c19b into relaxcn:master Nov 6, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants