title: What do the addresses in DMD stack traces mean?
body: <p>I compile the file stacktrace.d:
  <code>void main(){assert(false);}</code> with ASLR turned off and when running I get:</p>
  
  <pre><code>core.exception.AssertError@stacktrace.d(2): Assertion failure
  ----------------
  ??:? _d_assertp [0x55586ed8]
  ??:? _Dmain [0x55586e20]
  </code></pre>
  
  <p><code>objdump -t stacktrace|grep _Dmain</code> gives</p>
  
  <p><code>0000000000032e0c  w    F .text 0000000000000019              _Dmain</code></p>
  
  <p>And if I run <code>gdb -q -nx -ex start -ex 'disas /rs _Dmain' -ex q stacktrace</code>:</p>
  
  <pre><code>...
  Dump of assembler code for function _Dmain:
     0x0000555555586e0c &lt;+0&gt;: 55  push   %rbp
     0x0000555555586e0d &lt;+1&gt;: 48 8b ec    mov    %rsp,%rbp
  =&gt; 0x0000555555586e10 &lt;+4&gt;: be 02 00 00 00  mov    $0x2,%esi
     0x0000555555586e15 &lt;+9&gt;: 48 8d 3d 44 c0 02 00    lea    0x2c044(%rip),%rdi        # 0x5555555b2e60 &lt;_TMP0&gt;
     0x0000555555586e1c &lt;+16&gt;:    e8 47 00 00 00  callq  0x555555586e68 &lt;_d_assertp&gt;
     0x0000555555586e21 &lt;+21&gt;:    31 c0   xor    %eax,%eax
     0x0000555555586e23 &lt;+23&gt;:    5d  pop    %rbp
     0x0000555555586e24 &lt;+24&gt;:    c3  retq   
  </code></pre>
  
  <p>So even if the first two 0x55 bytes were just truncated off, 0x...86e20 given in the stack trace doesn't match the start of an instruction.</p>