[Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function
kungfujesus06 at gmail dot com
sourceware-bugzilla@sourceware.org
Mon Mar 6 23:47:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=21222
--- Comment #4 from Adam Stylinski <kungfujesus06 at gmail dot com> ---
Also I did search the registers as well, and it's not in the register it should
be in (xmm0) or any of the other vector registers either. I've compiled with
-fno-omit-frame-pointer and I still see the issue. The number of arguments to
the function seems to have an affect on whether or not the issue happens. That
was the bare minimum number of arguments before the issue showed up.
(gdb) disass
Dump of assembler code for function testFunc(float*, unsigned long, float*,
float*, float*, float, int, float, float**, float**, float**, float*, float*):
0x0000000000400526 <+0>: push %rbp
0x0000000000400527 <+1>: mov %rsp,%rbp
0x000000000040052a <+4>: sub $0x50,%rsp
0x000000000040052e <+8>: mov %rdi,-0x18(%rbp)
0x0000000000400532 <+12>: mov %rsi,-0x20(%rbp)
0x0000000000400536 <+16>: mov %rdx,-0x28(%rbp)
0x000000000040053a <+20>: mov %rcx,-0x30(%rbp)
0x000000000040053e <+24>: mov %r8,-0x38(%rbp)
0x0000000000400542 <+28>: vmovss %xmm0,-0x3c(%rbp)
0x0000000000400547 <+33>: mov %r9d,-0x40(%rbp)
0x000000000040054b <+37>: vmovss %xmm1,-0x44(%rbp)
0x0000000000400550 <+42>: vmovss 0x11c(%rip),%xmm0 # 0x400674
0x0000000000400558 <+50>: vdivss -0x44(%rbp),%xmm0,%xmm0
0x000000000040055d <+55>: vmovss %xmm0,-0x4(%rbp)
=> 0x0000000000400562 <+60>: vcvtss2sd -0x4(%rbp),%xmm2,%xmm2
0x0000000000400567 <+65>: vmovq %xmm2,%rax
0x000000000040056c <+70>: vmovq %rax,%xmm0
0x0000000000400571 <+75>: mov $0x400664,%edi
0x0000000000400576 <+80>: mov $0x1,%eax
0x000000000040057b <+85>: callq 0x400420 <printf@plt>
0x0000000000400580 <+90>: nop
0x0000000000400581 <+91>: leaveq
0x0000000000400582 <+92>: retq
End of assembler dump.
Here are the register contents:
http://pastebin.com/Mq4QVu24
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list