This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31309] g++ 4.2.0 amd64 codegen issue with -O0. 6 byte assignment at end of structure reads/writes past end of structure causing SEGV when that memory is not accessable.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Mar 2007 10:03:15 -0000
- Subject: [Bug c++/31309] g++ 4.2.0 amd64 codegen issue with -O0. 6 byte assignment at end of structure reads/writes past end of structure causing SEGV when that memory is not accessable.
- References: <bug-31309-12838@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-03-22 10:03 -------
Confirmed. The program segfaults also with -fno-inline -O[12] and we create
very
interesting code for XXX::Initialize:
_ZN3XXX10InitializeEi:
.LFB4:
movq (%rdi), %rax
movslq %esi,%rsi
pushq %rbx
.LCFI0:
movq (%rax,%rsi,8), %rbx
movb $0, 8(%rbx)
movb $0, 9(%rbx)
call _Z17INIT_6_BYTES_ZEROv
movq 10(%rbx), %rdx
movzbl %al, %esi
movzbl %ah, %ecx
xorb %dl, %dl
orq %rsi, %rdx
movq %rax, %rsi
movb %cl, %dh
movq %rax, %rcx
andl $4278190080, %esi
andl $16711680, %ecx
andq $-16711681, %rdx
orq %rcx, %rdx
movabsq $-4278190081, %rcx
andq %rcx, %rdx
movabsq $1095216660480, %rcx
orq %rsi, %rdx
movq %rax, %rsi
andq %rcx, %rsi
movabsq $-1095216660481, %rcx
andq %rcx, %rdx
movabsq $280375465082880, %rcx
andq %rcx, %rax
orq %rsi, %rdx
movabsq $-280375465082881, %rcx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 10(%rbx)
popq %rbx
ret
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-22 10:03:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31309