Comment #0 by johannes.riecken — 2019-02-06T11:01:15Z
I compile the file stacktrace.d: void main(){assert(false);} with ASLR turned off and when running I get:
[email protected](2): Assertion failure
----------------
??:? _d_assertp [0x55586ed8]
??:? _Dmain [0x55586e20]
objdump -t stacktrace|grep _Dmain gives
0000000000032e0c w F .text 0000000000000019 _Dmain
And if I run gdb -q -nx -ex start -ex 'disas /rs _Dmain' -ex q stacktrace:
...
Dump of assembler code for function _Dmain:
0x0000555555586e0c <+0>: 55 push %rbp
0x0000555555586e0d <+1>: 48 8b ec mov %rsp,%rbp
=> 0x0000555555586e10 <+4>: be 02 00 00 00 mov $0x2,%esi
0x0000555555586e15 <+9>: 48 8d 3d 44 c0 02 00 lea 0x2c044(%rip),%rdi # 0x5555555b2e60 <_TMP0>
0x0000555555586e1c <+16>: e8 47 00 00 00 callq 0x555555586e68 <_d_assertp>
0x0000555555586e21 <+21>: 31 c0 xor %eax,%eax
0x0000555555586e23 <+23>: 5d pop %rbp
0x0000555555586e24 <+24>: c3 retq
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.