On Sat, 2026-03-14 at 00:47 +0530, Saish Kambali via Gcc wrote:
> Hello,
> 
> My name is Saish Kambali and I am a second-year B.Tech CSE student
> interested in applying for GSOC 2026 with GCC.

Hi Saish; thanks for your interest.

> 
> Since the GSoC organizations were announced, I have been studying
> several
> core concepts including:
> 
> • GCC intermediate representation (GIMPLE)
> • GIMPLE in SSA form
> • Control Flow Graphs and basic blocks
> • PHI nodes and SSA variables
> • The GCC static analyzer (-fanalyzer)
> • Analyzer architecture (supergraph, exploded graph, region_model,
> and
> state machines)
> • Analyzer hooks such as on_stmt and on_call
> • Core data structures used in the analyzer such as tree nodes and
> gcall
> 
> Also, I built GCC from source and have been compiling programs using
> my
> local build (xgcc).

Sounds like you've made a good start.  A good followup exercise is the
"hello world" one described here:
https://gcc-newbies-guide.readthedocs.io/en/latest/getting-started.html


>  I also spent time reading state machines such as
> `sm-malloc.cc`.
> 
> Also, I have experimented with a toy checker to understand how
> analyzer
> hooks and diagnostics work.

Interesting, what did you try to implement, and how far did you get?

>  I also explored modifying `sm-malloc.cc` to
> detect `malloc(0)`.

My understanding is that malloc(0) is valid, but is implementation-
defined behavior.  I'm not sure that we'd want to emit a warning for
it.

> 
> I am interested in the project idea about extending the static
> analyzer,
> especially adding checks for POSIX APIs that are not currently
> modeled by
> the analyzer

After the "hello world" exercise, you should look at the known_function
implementations in kf.cc.  A good exercise is to try wiring up a new
one: pick a function POSIX or the C standard library and "teach" -
fanalyzer about it.  Note that other candidates have already done this
for the mkstemp and atoi families of functions, and another candidate
is looking at getenv, so you'll want to pick something different from
all of them.

> I am also sharing my GitHub link where I documented my learning and
> toy
> checking: https://github.com/SaishKambaliDev/GSoc_2026_Learning.git
> 
> If there are beginner-friendly issues or recommended points within
> the
> analyzer, I would greatly appreciate any guidance.

What kind of C++ experience do you have?  Working on -fanalyzer (and
indeed all of the GCC GSoC projects) assumes a fair level of comfort at
working on/debugging C++ code; if a student is not already moderately
comfortable with it, I'd recommend a different GSoC organization.  The
known_function thing I mentioned above is a good way for a candidate to
demonstrate their abilities with C++.


> 
> Your's sincerely,
> Saish Kambali

Hope this is helpful; let me know if you have followup questions.

Dave

Reply via email to