[cfe-dev] Why -checker-simple is disabled in scan-build?

Zhongxing Xu xuzhongxing at gmail.com
Sun Oct 5 20:20:32 PDT 2008


On Mon, Oct 6, 2008 at 1:16 AM, Ted Kremenek <kremenek at apple.com> wrote:

>
> On Oct 5, 2008, at 3:11 AM, Zhongxing Xu wrote:
>
>  No real reason, other than -checker-cfref functionally does the same thing
>> as -checker-simple except that it does the retain/release checking for
>> Objective-C.  All -checker-simple does is run the path-sensitive engine and
>> execute its internal checks.  It's also a bad name.  "-checker-basic-checks"
>> instead?
>>
>> I prefer shorter name "-checker-basic". What do you think that we make it
>> available for pure C code checking?
>>
>
>
> -checker-basic sounds fine.
>
> Just to be clear, -checker-cfref works on C code as well.  It just knows
> about the retain/release methods and also tracks reference counts.  It does
> all the same checks as -checker-simple does, and the performance impact is
> so minimal it didn't seem worth confusing people with two options and always
> run with "maximum checking."  That said, we probably should provide a
> separate scan-build option to run -checker-basic, and maybe one option,
> -checker-all-checks, that enables everything.
>
> The current transfer function implementation is not designed will for
> checker composition, and I see this as the next big overhauling in the
> design of the system.  Right now the code in CFRefCount.cpp does some
> redundant work also done in GRSimpleVals.cpp, and the transfer function
> object defined in CFRefCount.cpp also subclasses GRSimpleVals.cpp and
> overrides some of its virtual functions.  This just doesn't seem very
> modular to me.


Exactly. Right now there is not many different transfer functions other than
GRSimpleVals due to the BasicStore limitation. So how to modularize transfer
functions seems still unclear.  But when we have RegionStore in position,
the necessity is obvious. Foremost, state splitting will be common. For
example, when we have to assign to an array element with a symbolic index,
assume the symbolic index to be every or random possible value and split up
the state is necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081006/ec765716/attachment.html>


More information about the cfe-dev mailing list