This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/48142] New: miscompilation with -mpreferred-stack-boundary=5 -fstack-check=specific
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2011 01:27:11 +0000
- Subject: [Bug target/48142] New: miscompilation with -mpreferred-stack-boundary=5 -fstack-check=specific
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48142
Summary: miscompilation with -mpreferred-stack-boundary=5
-fstack-check=specific
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 23674
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23674
reduced testcase
Output:
$ g++ -Os -mpreferred-stack-boundary=5 -fstack-check=specific
-fno-omit-frame-pointer testcase.C
$ valgrind -q ./a.out
==16640== Invalid read of size 8
==16640== at 0x4007D0: main (testcase.C:6)
==16640== Address 0xfffffffffffffff8 is not stack'd, malloc'd or (recently)
free'd
(gdb) i r rsp
rsp 0xfffffffffffffff8 0xfffffffffffffff8
(gdb) disassemble
0x00000000004007c6 <+82>: pop %rcx
0x00000000004007c7 <+83>: pop %r10
0x00000000004007c9 <+85>: xor %eax,%eax
0x00000000004007cb <+87>: pop %rbp
0x00000000004007cc <+88>: lea -0x8(%r10),%rsp
=> 0x00000000004007d0 <+92>: retq
End of assembler dump.
Tested revisions:
r171001 - fail
4.6 r170955 - fail
4.5 r170955 - OK