clarify assumption
[web.git] / ralf / _posts / 2022-04-11-provenance-exposed.md
index ae036243e1765f0312f550fa3b1d7e7a8f09cdf3..0dcf9e0258ca228db4f06e7e6187024ef3855d48 100644 (file)
@@ -115,9 +115,9 @@ int main() {
 We started out with a program that always prints `1`, and ended up with a program that always prints `0`.
 This is bad news. Our optimizations changed program behavior. That must not happen! What went wrong?
 
-Fundamentally, this is the same situation as in the previous blog post: this
-example demonstrates that either the original program already had Undefined
-Behavior, or (at least) one of the optimizations is wrong. However, the only possibly suspicious part of the original program is a pointer-integer-pointer round-trip -- and if casting integers to pointers is allowed, *surely* that must work.
+Fundamentally, this is the same situation as in the previous blog post: this example demonstrates that either the original program already had Undefined Behavior, or (at least) one of the optimizations is wrong.
+However, the only possibly suspicious part of the original program is a pointer-integer-pointer round-trip -- and if casting integers to pointers is allowed, *surely* that must work.
+I will, for the rest of this post, assume that replacing `x` by `(int*)(uintptr_t)x` is always allowed.
 So, which of the optimizations is the wrong one?
 
 ## The blame game