Kent Williams
2012-May-22 16:20 UTC
[LLVMdev] CLang issue: Weird crashes in _Unwind_resume?
I have this project that I can't see how to boil down into a cut down illustration of the problem as it requires a large 3rd party library (ITK www.itk.org), and the problem is actually triggered in that library. But here is the problem: If you compile ITK and the program, it will segfault in _Unwind_resume at the end of a class method. If you build with GCC (4.6.1 in this case) the program passes all regression tests. In gdb, it's really difficult to see what's going on. For one thing it looks like CLang++ is rearranging code even if the -g flag is given -- the execution cursor jumps around in the source code display. And of course, there's no source to look at for Unwind_Resume. So I'm asking if anyone else has seen something like this issue? Is this a problem with our program, with ITK, or with CLang++? FYI This occurs with the last ITK release -- 3.2.1 -- and doesn't occur with ITK 4.1
Marco Nolden
2012-May-22 16:32 UTC
[LLVMdev] [Insight-users] CLang issue: Weird crashes in _Unwind_resume?
Hi Kent, this is caused by an ITK_NO_RETURN in itkImageSource.h . This macro declares the method as not returning, but it actually returns in some cases. If you remove the ITK_NO_RETURN, everything works fine. We had the same problem in MITK and fixed it by patching ITK. No problems so far. Best, Marco On 05/22/2012 06:20 PM, Kent Williams wrote:> I have this project that I can't see how to boil down into a cut down > illustration of the problem as it requires a large 3rd party library > (ITK www.itk.org), and the problem is actually triggered in that > library. But here is the problem: If you compile ITK and the > program, it will segfault in _Unwind_resume at the end of a class > method. If you build with GCC (4.6.1 in this case) the program passes > all regression tests. > > In gdb, it's really difficult to see what's going on. For one thing > it looks like CLang++ is rearranging code even if the -g flag is given > -- the execution cursor jumps around in the source code display. And > of course, there's no source to look at for Unwind_Resume. > > So I'm asking if anyone else has seen something like this issue? Is > this a problem with our program, with ITK, or with CLang++? > > FYI This occurs with the last ITK release -- 3.2.1 -- and doesn't > occur with ITK 4.1 > _____________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Kitware offers ITK Training Courses, for more information visit: > http://www.kitware.com/products/protraining.php > > Please keep messages on-topic and check the ITK FAQ at: > http://www.itk.org/Wiki/ITK_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.itk.org/mailman/listinfo/insight-users
Sean McBride
2012-May-22 17:52 UTC
[LLVMdev] [cfe-dev] CLang issue: Weird crashes in _Unwind_resume?
On Tue, 22 May 2012 11:20:32 -0500, Kent Williams said:>I have this project that I can't see how to boil down into a cut down >illustration of the problem as it requires a large 3rd party library >(ITK www.itk.org), and the problem is actually triggered in that >library. But here is the problem: If you compile ITK and the >program, it will segfault in _Unwind_resume at the end of a class >method. If you build with GCC (4.6.1 in this case) the program passes >all regression tests. > >In gdb, it's really difficult to see what's going on. For one thing >it looks like CLang++ is rearranging code even if the -g flag is given >-- the execution cursor jumps around in the source code display. And >of course, there's no source to look at for Unwind_Resume. > >So I'm asking if anyone else has seen something like this issue? Is >this a problem with our program, with ITK, or with CLang++? > >FYI This occurs with the last ITK release -- 3.2.1 -- and doesn't >occur with ITK 4.1Kent, You have rediscovered this bug: <http://llvm.org/bugs/show_bug.cgi?id=9395> See also this: <http://llvm.org/bugs/show_bug.cgi?id=12200> Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada