David Chisnall
2012-Nov-28 17:30 UTC
[LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
On 28 Nov 2012, at 17:02, Tanya Lattner wrote:>> 14116 - Inliner incorrectly combines cleanup and catch landing pads > > I think this one can be moved out as a release blocker. Too much debate and no action on the bug in over a month.This bug means that we can't compile at anything over -O1, or we get code that does the wrong thing (e.g. terminate instead of catching an exception) if a function with a cleanup is inlined into one with a catch (or possibly the other way around). I would really like to see it fixed for 3.2, because it results in some fairly serious miscompilations. I discussed it with a few people at the DevMeeting. David
Tanya Lattner
2012-Nov-28 19:41 UTC
[LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
On Nov 28, 2012, at 9:30 AM, David Chisnall <dc552 at cam.ac.uk> wrote:> On 28 Nov 2012, at 17:02, Tanya Lattner wrote: > >>> 14116 - Inliner incorrectly combines cleanup and catch landing pads >> >> I think this one can be moved out as a release blocker. Too much debate and no action on the bug in over a month. > > This bug means that we can't compile at anything over -O1, or we get code that does the wrong thing (e.g. terminate instead of catching an exception) if a function with a cleanup is inlined into one with a catch (or possibly the other way around). I would really like to see it fixed for 3.2, because it results in some fairly serious miscompilations. I discussed it with a few people at the DevMeeting.So why isn't this caught by any of the regression testing (testsuite) if it nothing above -O1 can be compiled? I assume you mean for your project? I'm trying to understand how large of a problem this is. Ideally, we want everything we can to get fixed.. but since there is some confusion and debate on this bug, I'm thinking its not a quick or easy fix. -Tanya> > David
David Chisnall
2012-Nov-28 19:49 UTC
[LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
On 28 Nov 2012, at 19:41, Tanya Lattner wrote:> So why isn't this caught by any of the regression testing (testsuite) if it nothing above -O1 can be compiled? I assume you mean for your project?Any Objective-C on non-Apple platforms that uses cleanups (including those Clang inserts for blocks) breaks in certain cases with inlining. There are also some cases in C++, and cases in LTO (or using C headers in C++) when C++ code and C code using __attribute__((cleanup)) are mixed. We have an ugly hack in clang that avoids it in the most common case, but there are almost certainly cases that we are not catching.> I'm trying to understand how large of a problem this is. Ideally, we want everything we can to get fixed.. but since there is some confusion and debate on this bug, I'm thinking its not a quick or easy fix.There is no debate in the bug. The consensus (both in the bug report and in-person discussions at the DevMeeting) is that the inliner is doing an obviously wrong thing when it takes a function containing a catchall and one containing a cleanup, inlines one into the other, and ends up with one with just a cleanup. The discussion in the bug report is due to the fact that there are probably also some corner cases where the wrong thing happens, but the inliner bug is the serious one. David
Reasonably Related Threads
- [LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
- [LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
- [LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th
- [LLVMdev] !!! 3.2 Release RC2 deadline November 29th
- [LLVMdev] !!! 3.2 Release RC2 deadline November 29th