[GSoC][Static Analyzer] Some questions and request for a small patch to work on

David Malcolm dmalcolm@redhat.com
Tue Feb 21 22:55:09 GMT 2023

On Tue, 2023-02-21 at 22:26 +0100, Shengyu Huang via Gcc wrote:
> Dear all,

Hi Shengyu, and welcome.
> I want to work on the Static Analyzer project and just started to
> read the documentation these days, 

Excellent!  I'm the author/maintainer of the analyzer, so I would
mentor any such GSoC project.

> but what’s mentioned in 27.1.6 in the internal document
> (https://gcc.gnu.org/onlinedocs/gccint/Analyzer-Internals.html#Analyz
> er-Internals) seems outdated or not detailed enough. 

Yeah, that section is rather out of date.  Sorry about that.

We now have some function pointer analysis (thanks to Ankur Saini's
GSoC 2021 project).

> For example, I didn’t find any “TODO/xfail” in the testsuite. 

Sorry, when it says "grep for TODO/xfail in the testsuite" I really
meant grep for "TODO" or for "xfail" in the testsuite.

But a better place to look would probably be in our bugzilla; see the
links on the wiki page:
The "open bugs" list currently has 41 "RFE" bugs ("request for
enhancement" i.e. ideas for new features), some of which might make
suitable GSoC ideas, and/or be of interest to you (ideally both!)

Also, the GSoC wiki page has some project ideas:

> Some points sound very interesting to me (specifically, 1) adding
> function pointer analysis, 

> 2) assumption of reflexivity of constraint-handling, 3) expensive
> implementation of transitivity in constraint_manager), and I would
> like to look into these three points if you believe they can be
> converted into a valid GSoC project. Could you give me more details
> regarding these three points? 

I believe that (2) and (3) are still true, but I don't think they'd
make good GSoC projects; I think the stuff in bugzilla is much more
interesting and higher priority.

> In addition, would there be anything related and simple enough that I
> can work on before the application period? 

If you haven't seen it yet, you might find my guide to GCC for new
contributors helpful:

IIRC I saw you post a few days ago about trying to build gcc on your M2
laptop; did you manage this?  Building GCC trunk from a git checkout,
and hacking in a "hello world" warning would be a great place to start.
See the guide above for some hints on how to make this process quicker,
and let me know if you need help if you run into difficulties.  Given
that the analyzer is about emitting warnings, rather than generating
code, it may be that although we don't yet fully support your hardware,
we *might* already support it enough to allow for hacking on the
analyzer, perhaps with some judicious choices of "configure" options.

Hope this is helpful; welcome again.

> Best,
> Shengyu

More information about the Gcc mailing list