[cfe-dev] catch handlers not working on linux

James Gregurich bayoubengal at mac.com
Thu Dec 12 12:19:07 PST 2013


I discovered that fundamental exception handling is not functioning for me when building code for i386 linux and ppc linux. The programs terminate with unhanded exception errors when there are clearly catch handlers provided. I’m stepping through the assembly to see what might be going wrong, but I don’t yet have a clue yet why it is failing to find the catch handlers. Anyone have any useful insight into what might be happening? This is pretty fundamental functionality to be failing. I have a sneaky suspicion the problem lies in the interaction between clang and the binutils since it works fine if I target darwin with Apple’s clang.


compiler invocation:

ecc-g++ -target ppc-ellcc-linux   test.cpp -o test.exe -lc++ -lUnwind -m32
ecc-g++ -target i386-ellcc-linux   test.cpp -o test.exe -lc++ -lUnwind

clang version:

ecc-g++ --version
clang version 3.5 (trunk)
Target: ecc
Thread model: posix



sample that fails:

#include<exception>

int main(int, char**)
{

   try
   {
      throw std::exception();
   }
   catch(std::exception& e)
   {
      return -1;
   }


   return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131212/774a45e8/attachment.html>


More information about the cfe-dev mailing list