Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

segmentation fault on icc 64bit version

linqunzju
Beginner
398 Views

I build a .so by icc 10.1.011 64bit version on linux.

but i got many segment fault when running .so.

i caught the segmentation fault in gdb. found all segmentation fault is due to icc use movaps to initialized struct or copy struct, the the variant doesn't aligned to 128bit.

which compile option should i use when i build 64bit .so to make sure all variant will be aligned to 128bit if it will use movaps?

i have tried dbg version and release version, they have the same issue.

for debug version, following compile optionare used:

-g -O0 -static-intel -pthread -fno-rtti -fno-exception

for release version

-static-intel -pthread -fno-rtti -fno-exception -O3

I also tried following options, results are same:(.

-alias, -ffnalias, -Zp16, -alias-args -falign-function=16..

0 Kudos
2 Replies
TimP
Honored Contributor III
398 Views
icc should automatically align all variables where it has the opportunity to do so. -O0 should not be generating movaps with a memory reference, unless you have used explicitSSE intrinsics. We may need an actual example to diagnose this. You could submit one as a problem report on premier.intel.com.
0 Kudos
linqunzju
Beginner
398 Views

yes, we have use sse code in another files.

did you means if we have use sse code in project, icc will automatically generate code with sse intrinsics for all project?

but why i doesn't see segmentfaultation fault if i build it with icc 32bit version?

i also noticed in msvc2003 and msvc2005, it will use sse intrinsics automatically for 64bit compiler, how about icc?

i am afraid it is hard to seperate a example from my project, maybe i can paste some disassamle code from gdb, if it can give you some help.

0 Kudos
Reply