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

Application crashes on SnowLeopard OSX 10.6.3

lohinyeung
Beginner
451 Views

Hi there,

We have installed the latest version of Intel C++ Compiler Professional Edition for Mac (11.1.088) on SnowLeopard OS X 10.6.3 (Xcode 3.2.2). Our application is working fine on Leopard OS X 10.4 (Xcode 3.1, Intel C++ Complier 11.1.046). But it is no longer working on SnowLeopard. By analysing our code, we noticed that by simply declaring a boost::posix_time::prime variable can cause an "EXC_BAD_ACCESS" exception. We have even tried both the boost_1_39_0 and boost_1_43_0 headers. I have created a simple application below to demonstration the problem. If the same code is re-compiled with gcc4.2, it is working fine.

#include

#include

using namespace boost::posix_time;

int main (int argc, char * const argv[]) {

ptime Timer; // crashes here !!!!

return 0;

}

Can it be the compiler issue? Please advise.

Best Regards

Simon

0 Kudos
7 Replies
Dale_S_Intel
Employee
451 Views
Well, so far I'm not able to reproduce the problem, though it's not an exact match for your versions:

$ icc -V
Intel C Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100203 Package ID: m_cproc_p_11.1.084
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.6.2
BuildVersion: 10C540
$ icpc -Iboost_1_43_0 bug.cpp
$ ./a.out
$ g++ -Iboost_1_43_0 bug.cpp
$ ./a.out
$


Before I delve too much further into this, can you confirm that this is all I should need to do to reproduce the problem you're seeing? Have you tried any other versions of Snow Leopard (i.e. is it new in Snow Leopard, or new in this version of Snow Leopard)? I presume it works with the latest 11.1.088 on Leopard?

Thanks!
Dale


0 Kudos
lohinyeung
Beginner
451 Views

Hi Dale

Here are what we found while running the simple application:

#include

#include

using namespace boost::posix_time;

int main (int argc, char * const argv[]) {

ptime Timer; // crashes here !!!!

return 0;

}

Intel Compiler MacOS X Xcode Result

1.11.084 10.6.3 3.2.2 crashes (Program received signal: EXC_BAD_ACCESS.)

1.11.088 10.6.3 3.2.2 crashes (Program received signal: EXC_BAD_ACCESS.)

1.11.084 10.6 3.2 good

If you upgrade your system to 10.6.3, you should also seeing the problem.

For your information, here are the compile details:

CompileICC build/Simple.build/Release/Simple.build/Objects-normal/x86_64/main.o main.cpp

cd /Users/simon/Projects/Simple

/Developer/usr/local/bin/icc-11.1-base/bin/intel64/icc -x c++ -arch x86_64 -dev-usr-root=/Developer/usr -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -g -O0 -w1 -fno-omit-frame-pointer -std=gnu99 -fvisibility=hidden -fpascal-strings -I/Users/simon/Projects/Simple/build/Simple.build/Release/Simple.build/Simple-txt.hmap -F/Users/simon/Projects/Simple/build/Release -I/Users/simon/Projects/Simple/build/Release/include -I/Users/simon/Projects/Simple/../mpeg4sp-codecs/Code/C/boost_1_39_0 -c /Users/simon/Projects/Simple/main.cpp -o /Users/simon/Projects/Simple/build/Simple.build/Release/Simple.build/Objects-normal/x86_64/main.o

Ld build/Simple.build/Release/Simple.build/Objects-normal/x86_64/Simple normal x86_64

cd /Users/simon/Projects/Simple

setenv MACOSX_DEPLOYMENT_TARGET 10.5

/Developer/usr/local/bin/icc-11.1-base/bin/intel64/icpc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/simon/Projects/Simple/build/Release -F/Users/simon/Projects/Simple/build/Release -filelist /Users/simon/Projects/Simple/build/Simple.build/Release/Simple.build/Objects-normal/x86_64/Simple.LinkFileList -mmacosx-version-min=10.5 -dev-usr-root=/Developer/usr "" "" -o /Users/simon/Projects/Simple/build/Simple.build/Release/Simple.build/Objects-normal/x86_64/Simple

Best Regards

Simon

0 Kudos
lohinyeung
Beginner
451 Views
Intel C++ Compiler 11.1does not work with Xcode 3.2.2.

Once we down-graded from Xcode 3.2.2 to 3.2.1. Codes are started working as expected.

So therefore:
OS X 10.6.3 + Intel Compiler 11.1.088 + Xcode 3.2.1 = good

Best Regards
Simon

0 Kudos
Dale_S_Intel
Employee
451 Views
Thanks for the analysis, I'll look into it. In the meantime, are you able to proceed with XCode 3.2.2?

Thanks!
Dale
0 Kudos
lohinyeung
Beginner
451 Views
We have rolled our build machine to use OSX 10.6.3, with Xcode 3.2.1 and Complier 11.1.088. Our application is now building and running fine.
Thanks for your support.
Best Regards
Simon
0 Kudos
Quoc-An_L_Intel
Moderator
451 Views
Is this a problem with 32bit or 64bit? There is a known issue with Xcode 3.2.2 linker for 64bit binary reported on Apple radar #7892392. The workaround is to use the option -use_asm.
0 Kudos
Quoc-An_L_Intel
Moderator
451 Views
This should be resolvewith the latest compiler update.
0 Kudos
Reply