rust/src/tools
Bastian Kersting 1087042e22 Insert checks for enum discriminants when debug assertions are enabled
Similar to the existing nullpointer and alignment checks, this checks
for valid enum discriminants on creation of enums through unsafe
transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```
An extension of this check will be done in a follow-up that explicitly
sanitizes for extern enum values that come into Rust from e.g. C/C++.

This check is similar to Miri's capabilities of checking for valid
construction of enum values.

This PR is inspired by saethlin@'s PR
https://github.com/rust-lang/rust/pull/104862. Thank you so much for
keeping this code up and the detailed comments!

I also pair-programmed large parts of this together with vabr-g@.
2025-06-27 09:37:36 +00:00
..
build-manifest Rollup merge of #142053 - heiher:loong32-none, r=wesleywiser 2025-06-08 17:17:53 -07:00
bump-stage0 Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
cargo@fc1518ef02 Update cargo 2025-06-06 14:51:35 +08:00
cargotest
clippy Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-dead 2025-06-06 23:53:16 +02:00
collect-license-metadata
compiletest Add new Tier-3 targets: loongarch32-unknown-none* 2025-06-06 08:19:38 +08:00
coverage-dump Update miniz_oxide dependency of coverage_dump 2025-05-10 18:35:20 +02:00
enzyme@a35f4f7731 update enzyme to handle range metadata 2025-02-28 03:53:22 -05:00
error_index_generator Move error_index_generator to the rustbook workspace 2025-02-17 10:58:15 -08:00
features-status-dump Remove backtrace dep from anyhow in features status dump tool 2025-05-01 07:45:47 -04:00
generate-copyright Rollup merge of #141789 - ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789 2025-06-01 19:35:44 +02:00
generate-windows-sys Update windows-bindgen to 0.61.0 2025-04-04 16:41:40 +00:00
html-checker
jsondocck jsondocck: Explain what KNOWN_DIRECTIVE_NAMES is doing 2025-06-05 11:33:38 +00:00
jsondoclint rustdoc: Output target feature information 2025-04-15 21:26:14 -05:00
libcxx-version
linkchecker bump html5ever to 0.29 with deps 2025-03-13 19:59:53 +03:00
lint-docs Avoid including text direction codepoints in lint messages 2025-05-27 15:57:41 +00:00
lld-wrapper
llvm-bitcode-linker Pass through of target features to llvm-bitcode-linker and handling them 2025-02-16 21:57:03 +01:00
miri Insert checks for enum discriminants when debug assertions are enabled 2025-06-27 09:37:36 +00:00
miropt-test-tools
nix-dev-shell Deduplicate nix code 2025-04-17 00:01:04 -04:00
opt-dist Bump rustc-perf and update PGO crates 2025-05-29 09:00:36 +00:00
remote-test-client
remote-test-server
replace-version-placeholder
run-make-support run-make-support: support "ejecting" the underlying std command 2025-05-09 19:54:35 +08:00
rust-analyzer Merge from rust-lang/rust 2025-06-09 15:44:40 +03:00
rust-installer Rustfmt 2025-02-08 22:12:13 +00:00
rustbook rustbook: Bump versions of onig and onig_sys 2025-05-28 15:36:32 +03:00
rustc-perf@6a70166b92 Bump rustc-perf and update PGO crates 2025-05-29 09:00:36 +00:00
rustdoc librustdoc: 2024 edition! 🎊 2025-03-04 12:35:18 +02:00
rustdoc-gui Update browser-ui-test version to 0.20.2 2025-02-05 17:06:38 +01:00
rustdoc-gui-test Improve error output in case nodejs or npm is not installed for rustdoc-gui test suite 2025-05-01 17:42:22 +02:00
rustdoc-js tester.js: ignore displayTypeSignature if it is null 2025-03-27 16:00:44 -05:00
rustdoc-themes
rustfmt Rollup merge of #141603 - nnethercote:reduce-P, r=fee1-dead 2025-06-06 23:53:16 +02:00
suggest-tests Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
test-float-parse move test-float-parse tool into src/tools dir 2025-06-03 11:05:51 +03:00
tidy Auto merge of #141229 - tgross35:builtins-josh-subtree, r=Kobzol 2025-06-03 19:52:05 +00:00
tier-check
unicode-table-generator Remove unneeded parentheses. 2025-03-08 12:56:00 +01:00
unstable-book-gen Rollup merge of #141526 - jyn514:env-vars, r=petrochenkov 2025-05-27 01:29:21 +08:00
wasm-component-ld Update wasm-component-ld to 0.5.13 2025-04-23 14:37:17 -07:00
x Add src/tools/x to the main workspace 2025-03-13 12:18:32 -07:00
cherry-pick.sh
publish_toolstate.py Update toolstate maintainers 2025-01-23 09:55:21 -08:00