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

SIGABRT when throwing exception from code compiled with clang++ in subproject of Intel C++ project in OSX XCode 5 32 bit

Sergei_K_
Beginner
591 Views

I have a very simple 32 bit Xcode project setup running under OSX 10.9.5, Xcode 5.2

Main project - compiled by Intel C++ calling constructor of a class in a subproject. Subproject is a static library, compiled by llvm clang++.

In my main project (Intel C++) I have:

main.cpp:
#include "test.h"
int main(int argc, const char * argv[])
{
    test t;
    return 0;
}

In my subproject (LLVM Clang++) I have:

test.h:
class test {
public:
    test();
};

test.cpp:
#include "test.h"

test::test()
{
    try {
        throw 1;
    } catch (...) { 
    }
}

Exception, thrown in test::test() is not caught, causing abnormal termination. 

When I change compiler of my main project to LLVM Clang++, the exception is caught as expected.

I've attached my test project.

0 Kudos
2 Replies
Feilong_H_Intel
Employee
591 Views

Hi Sergei,

I've reproduced the problem and entered it to our problem-tracking database.  I'll let you know when I have an update from engineering team.

Thanks.

0 Kudos
Feilong_H_Intel
Employee
591 Views

Hi Sergei,

Today I was informed that IPS XE 2015 Update 2 contains the fix for this issue.  You may download it at https://registrationcenter.intel.com.  FYI.

Thanks.

0 Kudos
Reply