Skip to content

Commit 7983e46

Browse files
RalfJungoli-obk
andauthored
Update text/0000-const-ub.md
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
1 parent 6e1739f commit 7983e46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/0000-const-ub.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ This means UB during CTFE can silently "corrupt" the build in a way that the fin
7979
The most obvious alternative is to say that UB during CTFE will definitely be detected.
8080
However, that is expensive and might even be impossible.
8181
Even Miri does not currently detect all UB, and Miri is already performing many additional checks that would significantly slow down CTFE.
82-
Furthermore, since optimizations can "hide" UB (an optimization can turn a program with UB into one without), this means we would have to run CTFE on unoptimized MIR.
82+
Furthermore, since optimizations can "hide" UB (an optimization can turn a program with UB into one without), this means we have to keep running CTFE on unoptimized MIR.
8383
And finally, implementing these checks requires a more precise understanding of UB than we currently have; basically, this would block having any potentially-UB operations at const-time on having a spec for Rust that precisely describes their UB in a checkable way.
8484
In particular, this would mean we need to decide on an aliasing model before permitting raw pointers in CTFE.
8585

0 commit comments

Comments
 (0)