rust/library
Urgau e5bc12e4a3
Rollup merge of #136601 - compiler-errors:borrow-null-zst, r=saethlin
Detect (non-raw) borrows of null ZST pointers in CheckNull

Fixes #136568. Ensures that we check that borrows of derefs are non-null in the `CheckNull` pass **even if** it's a ZST pointee.

I'm actually surprised that this is UB in Miri, but if it's certainly UB, then this PR modifies the null check to be stricter. I couldn't find anywhere in https://doc.rust-lang.org/reference/behavior-considered-undefined.html that discusses this case specifically, but I didn't read it too closely, or perhaps it's just missing a bullet point.

On the contrary, if this is actually erroneous UB in Miri, then I'm happy to close this (and perhaps fix the null check in Miri to exclude ZSTs?)

On the double contrary, if this is still an "open question", I'm also happy to close this and wait for a decision to be made.

r? ``@saethlin`` cc ``@RalfJung`` (perhaps you feel strongly about this change)
2025-02-09 00:37:28 +01:00
..
alloc Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
backtrace@f8cc6ac9ac Bump backtrace to 0.3.75 2025-01-03 20:16:52 -08:00
core occured -> occurred 2025-02-08 22:28:21 +00:00
coretests Rollup merge of #135945 - estebank:useless-parens, r=compiler-errors 2025-02-07 18:26:26 +01:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind Fix unreachable_pub lint for hermit target 2025-02-04 23:38:17 -08:00
portable-simd Bump stdarch 2024-12-24 19:00:57 +01:00
proc_macro proc_macro: add #![warn(unreachable_pub)] 2025-01-20 18:46:29 +01:00
profiler_builtins compiler & tools dependencies: 2024-12-17 17:41:00 +00:00
rtstartup rtstartup: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
rustc-std-workspace-alloc
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std
std Rollup merge of #136213 - erickt:fs, r=Mark-Simulacrum 2025-02-09 00:37:27 +01:00
stdarch@684de0d6fe Bump stdarch 2024-12-24 19:00:57 +01:00
sysroot Make profiler_builtins an optional dependency of sysroot, not std 2024-10-17 22:08:36 +11:00
test Rollup merge of #135948 - bjorn3:update_emscripten_std_tests, r=Mark-Simulacrum 2025-01-25 23:27:00 -05:00
unwind Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubilee 2025-01-06 22:04:13 -05:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock Update compiler-builtins to 0.1.145 2025-02-04 11:49:01 +00:00
Cargo.toml Put all coretests in a separate crate 2025-01-26 10:26:36 +00:00