title: Trying to print out contents of userspace memory
body: <p>On a 64-bit NetBSD system, why does this code just hang after printing a few lines and not segfault or complain? Changing <code>*add--</code> to <code>*add++</code> understandably segfaults since the process tries to access kernel memory after some iterations.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdint.h&gt;
  
  void main() {
          uint8_t x = 5;
          uint8_t *add = &amp;x;
          printf("%u\n", sizeof(void*));
  
          while (1)
                  printf("%p %x\n", add, *add--);
  
  }
  </code></pre>