gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coverity Scan for GNUstep?


From: Fred Kiefer
Subject: Re: Coverity Scan for GNUstep?
Date: Mon, 29 Jan 2018 23:41:37 +0100


> Am 29.01.2018 um 20:33 schrieb Wolfgang Lux <address@hidden>:
> 
> 
> 
>> Am 29.01.2018 um 18:15 schrieb Fred Kiefer <address@hidden>:
>> 
>> 
>> 
>>> Am 29.01.2018 um 11:32 schrieb Richard Frith-Macdonald <address@hidden>:
>>> 
>>>> On 29 Jan 2018, at 08:28, Fred Kiefer <address@hidden> wrote:
>>>> 
>>>> re is a problem with these numbers. Coverity did only analyse about one 
>>>> third of the Objective-C files in GNUstep base and most likely only the 
>>>> smaller files. Coverity at the moment has issues with Objective-C 
>>>> protocols and only works with files where there are no references to any. 
>>>> That means we don’t know how many of the 1 million lines where actually 
>>>> checked for defects. The number 0.01 is basically meaningless :-)
>>> 
>>> :-(
>>> 
>>> Where do I look to find out about thi
>>> I don't think gnustep-base actually *uses* protocols much, so perhaps we 
>>> can figure out ways to work around this limitation?
>> 
>> When running Coverity it reports these numbers (I would like to paste the 
>> messages here, but copy/paste is not working in my virtual machine :-(
>> It says that 54 Objective-C (27%) files where „emitted“ and 93 (36%) are 
>> ready for analysis.
>> 
>> As for the protocols, this is just how I translate this message from 
>> Coverity:
>> 
>> cov-internal-emit-clang-main.cpp:5: assertion failure: 
>> xlate-ast-types.cpp:1807: assertion failed: ObjCTypeParamType translation 
>> not implemented.
>> 
>> If you look at the clang code you see that  ObjCTypeParamType was introduced 
>> to support protocols.
> 
> I think that is a misunderstanding. ObjCTypeParamType is the syntactic 
> category related to type parameters of generic types. For instance, given a 
> declaration
>  NSArray<ElemType> *array;
> ElemType is the type parameter here and it signals that the array should 
> contain only instances of ElemType.

Thank you Wolfgang,

that was the idea that I needed to get further. I disabled the GS_GENERIC_CLASS 
macro in NSObjCRuntime.h and now all the files seem to compile with Coverity. 
The new result is currently being uploaded and will hopefully be processed in 
the next few hours. With that we should have a better picture of our „defect 
rate"

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]