[PATCH] Adding new checker idea to clang-analyzer www

Todd Nowacki nowacki724 at gmail.com
Mon Aug 5 14:29:10 PDT 2013


I've fixed the issues with the description text. I've also added links to
the progress made on these checkers.

-Todd


On Thu, Aug 1, 2013 at 2:06 PM, Anna Zaks <ganna at apple.com> wrote:

>
> On Aug 1, 2013, at 1:09 PM, Todd Nowacki <nowacki724 at gmail.com> wrote:
>
> I have already implemented the format checker, and it works fairly well.
> The reference count checker has a lot of progress, but there is still a
> significant portion of work that needs to be done. The Python/C API has a
> lot of functions for lists, tuples, and dictionaries; all of these
> functions subtly change the way reference counting works and limit the
> accuracy of the checker.
>
> I'll submit an updated patch soon to fix the wording and add links to the
> relevant portions of the API.
>
> Great!
>
> Feel free to submit the website update patch after you've addressed the
> comments.
>
> Anna.
>
>
> -Todd
>
>
> On Wed, Jul 31, 2013 at 10:54 AM, Anna Zaks <ganna at apple.com> wrote:
>
>> Todd, out of curiosity, are you interested in working on these checks
>> yourself?
>>
>> It would be useful to include a link/reference to the python docs or,
>> even better, the specific sections that document string formatting and ref
>> counting APIs.
>>
>> +Ensure that objects are freed objects are not used and that objects are
>> freed when no longer in use.
>> +Also ensure that correct use of Py_INCREF, Py_DECREF, Py_XINCREF, and
>> Py_XDECREF in various circumstances.
>> The wording on this one is off.
>>
>> This check is only partially related to RefCount, no?
>> +PyObject* test3() {
>> +  ...
>> +  return Py_None; //warn
>> +}
>>
>> Thanks,
>> Anna.
>>
>> On Jul 30, 2013, at 1:39 PM, Todd Nowacki <nowacki724 at gmail.com> wrote:
>>
>> I added a checker idea to the "Possible Future Checkers".
>>
>> The checkers would check various aspects of the Python/C API. see
>> http://docs.python.org/3.1/c-api/index.html
>>
>> One checker would ensure that the format string given to the functions
>> for parsing arguments and building values (Py_BuildValue, PyArg_ParseTuple,
>> etc.)
>> is not malformed and matches the arguments given.
>>
>> The other would check that objects are freed objects are not used and
>> that objects are freed when no longer in use. It would also ensure that
>> correct use of Py_INCREF, Py_DECREF, Py_XINCREF, and Py_XDECREF in various
>> circumstances.
>>
>> -Todd Nowacki
>> <checkerIdea.patch>_______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130805/e81807dc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checker_idea.patch
Type: application/octet-stream
Size: 2861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130805/e81807dc/attachment.obj>


More information about the cfe-commits mailing list