Summary
Add runtime checks to rustc that check for valid niche values. This is an
extension of a previous project goal
that added null pointer and enum checks and generally works towards checking for
Undefined behavior at runtime (in debug builds / behind compiler flags).
The check should fire for invalid values that are already created by inserting
a check at load-time / on function entry.
Tasks and status
Note: we have updated the body to match the 2025h2 goal. Your original text is preserved below.
Details
Summary
Add runtime checks to rustc that check for null pointers on pointer access and
invalid enum discriminants. Similar to integer overflow and pointer alignment
checks, this will only be enabled in debug builds.
Tasks and status
Summary
Add runtime checks to rustc that check for valid niche values. This is an
extension of a previous project goal
that added null pointer and enum checks and generally works towards checking for
Undefined behavior at runtime (in debug builds / behind compiler flags).
The check should fire for invalid values that are already created by inserting
a check at load-time / on function entry.
Tasks and status
Note: we have updated the body to match the 2025h2 goal. Your original text is preserved below.
Details
Summary
Add runtime checks to rustc that check for null pointers on pointer access and
invalid enum discriminants. Similar to integer overflow and pointer alignment
checks, this will only be enabled in debug builds.
Tasks and status