[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [PATCH] Fix crash when assiging to a property with an invalid type
From:       jahanian <fjahanian () apple ! com>
Date:       2014-08-04 19:26:01
Message-ID: 78A0AF06-8C31-4BF1-9749-8C4ED165615A () apple ! com
[Download RAW message or body]


On Aug 4, 2014, at 12:11 PM, Olivier Goffart <ogoffart@kde.org> wrote:

> On Wednesday 30 July 2014 14:02:51 jahanian wrote:
> > On Jul 30, 2014, at 1:43 PM, jahanian <fjahanian@apple.com> wrote:
> > > On Jul 30, 2014, at 1:21 PM, Olivier Goffart <ogoffart@kde.org> wrote:
> > > > It does crash for me (linux, r214316).
> > > > In debug mode, there is an assert. In release mode it segfaults.
> > > 
> > > Strange, I tested it against a debuggable compiler (with assert on).
> > > Let me investigate a bit more why it doesn’t crash for me.
> > 
> > OK. I missed that it was an ObjectiveC++ test. Both patches look good to me.
> 
> 
> Thanks.
> I committed them to trunk as r214734 and r214735.
> I believe they should be merged in the 3.5 branch since they fix regression 
> against 3.4, what do you think?

I am not sure what the bar is for fixing a crash on invalid code. If it is within \
                criteria then it is OK with me.
- Fariborz


> 
> 
> 
> > > 
> > > > > I don’t see a crash with TOT clang:
> > > > > 
> > > > > t.m:3:3: error: unknown type name 'A'
> > > > > A* response; // expected-error {{unknown type name 'A'}}
> > > > > ^
> > > > > t.m:8:11: error: unknown type name 'A'
> > > > > @property A* response;  // expected-error {{unknown type name 'A'}}
> > > > > 
> > > > > ^
> > > > > 
> > > > > t.m:13:16: error: expected a type
> > > > > - (void) foo :(A*) a   // expected-error {{expected a type}}
> > > > > 
> > > > > ^
> > > > > 
> > > > > t.m:15:17: error: assignment to readonly property
> > > > > self.response = a;
> > > > > ~~~~~~~~~~~~~ ^ ~
> > > > > 4 errors generated.
> > > > > 
> > > > > - Fariborz
> > > > > 
> > > > > On Jul 30, 2014, at 12:42 AM, Olivier Goffart <ogoffart@kde.org> wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > Attached you will find a fix for a crash I have when parsing objective
> > > > > > C
> > > > > > with missing include.
> > > > > > This is a regression against clang 3.4 which did not crash.
> > > > > > 
> > > > > > My approach here is naive and just fixes the symptoms (the crash).
> > > > > > 
> > > > > > Regards
> > > 
> > > _______________________________________________
> > > cfe-commits mailing list
> > > cfe-commits@cs.uiuc.edu
> > > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 


_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic