This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Segmentation Fault with "-march=core2" or "-msse"


I have a serious problem. I am currently working on a raytracer project where
I'm using my own Vector-Header. The Vector-Header-File consists of classes
(Vec2, Vec3, Vec4 etc.) that encapsulate the gcc-vector-intrinsics (e.g.
typedef float _vec __attribute__((vector_size(16))); ). All methods
(operators +, -, /, * ...) are realised as inline methods (no
cpp-source-file), because they are all very short (not more than 3 lines of
code per method). The Vector-Header was excessivly tested before and there
was no error at all. In my new raytracer project however, if set the
compiler switches "-msse" or "-msse2" there is segmentation fault because of
a "movaps" on unaligned data in a method that runs without error in any
other test case. I'm currently using Mingw-gcc 3.4.5. Here is an debugger
output from olly-debugger:

00402D44  |> 8940 10        /MOV DWORD PTR DS:[EAX+10],EAX
00402D47  |. 8940 14        |MOV DWORD PTR DS:[EAX+14],EAX
00402D4A  |. 8D48 04        |LEA ECX,DWORD PTR DS:[EAX+4]
00402D4D  |. 8948 18        |MOV DWORD PTR DS:[EAX+18],ECX
00402D50  |. 8D48 08        |LEA ECX,DWORD PTR DS:[EAX+8]
00402D53  |. 8948 1C        |MOV DWORD PTR DS:[EAX+1C],ECX
00402D56  |. 0F2900         |MOVAPS DQWORD PTR DS:[EAX],XMM0  <---CRASH
00402D59  |. 83C2 20        |ADD EDX,20
00402D5C  |. 83C0 20        |ADD EAX,20
00402D5F  |. 81FA 00010000  |CMP EDX,100
00402D65  |.^75 DD          \JNZ SHORT SpeedTes.00402D44

At first i wanted to send this bug to the official GCC-Bug-List, but they
don't want Sourcecode and because the Bug is not replicable without my
source, i decided to post it here instead. Does anybody has an idea to
overcome this problem without waiting for the next Mingw-GCC release?
-- 
View this message in context: http://old.nabble.com/Segmentation-Fault-with-%22-march%3Dcore2%22-or-%22-msse%22-tp28698142p28698142.html
Sent from the gcc - bugs mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]