From 9fbe3ff304532d5adea51828c613468904c66f23 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 2 Jul 2026 15:11:58 +0200 Subject: [PATCH] provenacne blog post: clarification --- personal/_posts/2020-12-14-provenance.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/personal/_posts/2020-12-14-provenance.md b/personal/_posts/2020-12-14-provenance.md index 94040c4..78e2538 100644 --- a/personal/_posts/2020-12-14-provenance.md +++ b/personal/_posts/2020-12-14-provenance.md @@ -123,7 +123,8 @@ This program has two possible behaviors: either `ip` (the address one-past-the-e Or the two are equal, in which case the program will print "10" (`iq` is the result of casting `q` to an integer, so casting it back will yield the original pointer, or at least a pointer pointing to the same object / location in memory). The first "optimization" we will perform is to exploit that if we enter the `if` body, we have `iq == ip`, so we can replace all `iq` by `ip`. -Subsequently the definition of `ip` is inlined: +The assignment thus becomes `*(char*)ip = 10`. +Subsequently, the definition of `ip` is inlined: {% highlight c %} char p[1], q[1] = {0}; uintptr_t ip = (uintptr_t)(p+1); -- 2.39.5