[cfe-dev] GSoC 2020 - Find null smart pointer dereferences with the LLVM-Clang Static Analyzer

via cfe-dev cfe-dev at lists.llvm.org
Sun Jun 7 16:02:52 PDT 2020


On Thu, Jun 4, 2020 at 2:55 PM Nithin Vadukkumchery Rajendrakumar via
cfe-dev <cfe-dev at lists.llvm.org> wrote:

> Greetings,
>
> Myself Nithin, I'm a master’s student at Technical University
> Kaiserslautern, Germany, studying computer science. I am extremely happy
> that my proposal for GSoC 2020 - Find null smart pointer dereferences with
> the LLVM-Clang Static Analyzer got accepted. This summer I will be working
> on adding the feature to the static analyser to find null smart pointer
> dereferences. I would like to thank the LLVM community for providing such a
> great opportunity.
>
> I am very much excited and terrified. Hopefully, with help from my mentors
> Artem Dergachev, Gabor Horwath, and Valeriy Savchenkod, I will be able to
> finish the project as expected. I think this project will be an amazing
> opportunity to learn more about Clang Static Analyzer and work with the
> wonderful LLVM community.
>
> I will try to blog my progress and anything exciting I find in my journey.
>

Hi,

That's very exciting to hear, I have been hoping for better smart pointer
support in the analyzer. I have a code snippet which you are welcome to
adapt if it helps you:

https://gitlab.gnome.org/ptomato/floatmage/-/commit/1af435b125c7c2d0f20953105c9a669e2862b695

I wrote this after asking for help on this mailing list a few months ago.
This was not for checking null dereferences, but it does some simple
modeling of std::unique_ptr, so it may end up being useful to you. I should
warn you that I am a relative beginner at the static analyzer, so it may
not even be correct, maybe your mentors will even use it as an example of
what not to do :-)

I wish you a great experience in your internship.

Best,
-- 
Philip C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200607/54d0254a/attachment.html>


More information about the cfe-dev mailing list