[LLVMdev] RFA: Problem with Exceptions

Duncan Sands baldrick at free.fr
Fri Aug 31 09:11:19 PDT 2007


Hi Bill,

> I'm compiling this trivial program on Darwin:
> 
> int main(int argc, char **argv) {
>   try {
>     throw argc;
>   } catch(int i) {
>     return i;
>   }
> 
>   return 0;
> }
> 
> However, it segfaults when I run it. I've attached the .s files
> generated by LLVM and GCC, but it looks as if LLVM isn't generating a
> gxx_personality_v0 section (like it does for Unwind_Resume, et al). Is
> this what's causing the failure? Does anyone know how to get it to
> generate this section?

does it segfault if you link using mainline g++?  Where does the segfault
occur - in the unwinder, or in the program itself (and if so, where)?

Thanks,

Duncan.



More information about the llvm-dev mailing list