This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17990] segfault in c++ code (unaligned movaps on the stack)
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2004 03:57:33 -0000
- Subject: [Bug target/17990] segfault in c++ code (unaligned movaps on the stack)
- References: <20041014032810.17990.shadow@serverart.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-10-14 03:57 -------
for (i=0;i<OSCIL_SIZE;i++) oscilFFTfreqs[i]=0.0;
25ad: a1 00 00 00 00 mov 0x0,%eax
25b2: 31 ff xor %edi,%edi
25b4: 39 c7 cmp %eax,%edi
25b6: 89 45 80 mov %eax,0xffffff80(%ebp)
25b9: 7d 1c jge 25d7
<_ZN8OscilGen7prepareEv+0x157>
25bb: 8b 55 e0 mov 0xffffffe0(%ebp),%edx
25be: 8b 92 88 05 00 00 mov 0x588(%edx),%edx
25c4: 89 55 84 mov %edx,0xffffff84(%ebp)
25c7: 8b 45 84 mov 0xffffff84(%ebp),%eax
25ca: c7 04 b8 00 00 00 00 movl $0x0,(%eax,%edi,4)
25d1: 47 inc %edi
25d2: 3b 7d 80 cmp 0xffffff80(%ebp),%edi
25d5: 7c f0 jl 25c7
<_ZN8OscilGen7prepareEv+0x147>
if (Pcurrentbasefunc==0) {//the sine case
25d7: 8b 55 e0 mov 0xffffffe0(%ebp),%edx
for (i=0;i<MAX_AD_HARMONICS;i++){
oscilFFTfreqs[i+1]=-hmag[i]*sin(hphase[i]*(i+1))/2.0;
oscilFFTfreqs[OSCIL_SIZE-i-1]=hmag[i]*cos(hphase[i]*(i+1))/2.0;
};
} else {
for (j=0;j<MAX_AD_HARMONICS;j++){
25da: 31 f6 xor %esi,%esi
25dc: 80 ba 29 01 00 00 00 cmpb $0x0,0x129(%edx)
25e3: 0f 85 1f 02 00 00 jne 2808
<_ZN8OscilGen7prepareEv+0x388>
25e9: 8b 82 88 05 00 00 mov 0x588(%edx),%eax
25ef: 31 ff xor %edi,%edi
25f1: f3 0f 10 05 00 00 00 movss 0x0,%xmm0
25f8: 00
25f9: 0f 29 45 88 movaps %xmm0,0xffffff88(%ebp)
25fd: 89 45 84 mov %eax,0xffffff84(%ebp)
2600: 89 85 7c ff ff ff mov %eax,0xffffff7c(%ebp)
2606: 8d 77 01 lea 0x1(%edi),%esi
2609: 8b 55 e0 mov 0xffffffe0(%ebp),%edx
260c: 0f 57 c0 xorps %xmm0,%xmm0
260f: f3 0f 2a c6 cvtsi2ss %esi,%xmm0
The problem seems that movaps is writing to memory which is not 16-byte aligned.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17990