X-Git-Url: https://git.ralfj.de/web.git/blobdiff_plain/5f98c590cc24200aecb3c5b1a93955f290a5929a..ed3579d7d6ad285fefc257e67bf65c8a9e963e99:/personal/_posts/2019-07-14-uninit.md?ds=sidebyside diff --git a/personal/_posts/2019-07-14-uninit.md b/personal/_posts/2019-07-14-uninit.md index e6643ca..e5d973b 100644 --- a/personal/_posts/2019-07-14-uninit.md +++ b/personal/_posts/2019-07-14-uninit.md @@ -1,6 +1,6 @@ --- title: '"What The Hardware Does" is not What Your Program Does: Uninitialized Memory' -categories: rust research +categories: rust research programming forum: https://internals.rust-lang.org/t/what-the-hardware-does-is-not-what-your-program-does-uninitialized-memory/10561 --- @@ -45,7 +45,7 @@ fn main() { } {% endhighlight %} `always_returns_true` is a function that, clearly, will return `true` for any possible 8-bit unsigned integer. -After all, *every* possible value for `x` will be less than 150 or bigger than 120. +After all, *every* possible value for `x` will be either less than 120, equal to 120, or bigger than 120. A quick loop [confirms this](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=65b690fa3c1691e11d4d45955358cdbe). However, if you [run the example](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=812fe3c8655bfedcea37bb18bb70a945), you can see the assertion fail.[^godbolt]