public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Adharsh Kamath <adharshkamathr@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC GSoC 2021 - Static analyzer project
Date: Thu, 11 Feb 2021 13:46:08 -0500	[thread overview]
Message-ID: <1c6963f183cf7ee49a86f6c8139d55bfb19a8ce1.camel@redhat.com> (raw)
In-Reply-To: <CAKr9Ocy-bNYD65Npcu98WhSkTgc86qNaVZexUg9754UC6D9qtQ@mail.gmail.com>

On Thu, 2021-02-11 at 22:35 +0530, Adharsh Kamath wrote:
> Hi David,
> 
> > Building GCC from source and stepping through it in the
> > debugger would be good next steps.  You'll need plenty of disk
> > space.
> >  "run_checkers" is a good breakpoint to set if you're looking for
> > the
> > entrypoint to the analyzer.
> > 
> 
> I tried this and I understood the control flow in the analyzer.
> 
> > There's an example plugin in that patch.  The kernel source tree
> > already has some plugins, so hopefully, those together give some
> > pointers on how to write a "hello world" analyzer plugin that runs
> > as
> > part of the kernel build, which would be another next step, I
> > guess.
> > 
> 
> I implemented a very simple hello world plugin here -
> https://github.com/adharshkamath/Hello-world-plugin.
> <https://github.com/adharshkamath/Hello-world-plugin>
> It just prints a Hello message while building the Linux Kernel, if
> the
> -fanalyzer option is enabled. I referred to the example plugin in the
> static analyzer
> and the plugins in the kernel source to do this.

Excellent.

> > See::
> >   * "How to write system-specific, static checkers in Metal"
> > (Benjamin
> > Chelf, Dawson R Engler, Seth Hallem), from 2002
> >   * "Checking system rules using system-specific, programmer-
> > written
> > compiler extensions" Proceedings of Operating Systems Design and
> > Implementation (OSDI), September 2000. D. Engler, B. Chelf, A.
> > Chou,
> > and S. Hallem.
> >   * "Using Programmer-Written Compiler Extensions to Catch Security
> > Holes" (Ken Ashcraft, Dawson Engler) from 2002
> > 
> 
> These were useful and interesting to read. Thank you for suggesting
> them.
> Adharsh

Great.

I believe you're in a position to write a strong application to GSoC
for yourself for this project; you're well ahead of the timeline, as I
understand it:
  https://summerofcode.withgoogle.com/how-it-works/#timeline

Dave


      reply	other threads:[~2021-02-11 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  5:15 Adharsh Kamath
2021-01-18 20:41 ` David Malcolm
2021-01-22 15:16   ` Adharsh Kamath
2021-01-22 16:01     ` David Malcolm
2021-01-23  9:04       ` Adharsh Kamath
2021-02-11 17:05       ` Adharsh Kamath
2021-02-11 18:46         ` David Malcolm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c6963f183cf7ee49a86f6c8139d55bfb19a8ce1.camel@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=adharshkamathr@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).