[llvmlinux] [GSoC] Static analysis

Eduard Bachmakov e.bachmakov at gmail.com
Thu May 2 14:55:35 UTC 2013


That's true but you're losing the scan-build like, colored html output (use
debatable) with explanations under what circumstance the issue happens
(branches taken, etc.) (very helpful).


On Thu, May 2, 2013 at 4:49 AM, PaX Team <pageexec at freemail.hu> wrote:

> On 1 May 2013 at 19:47, Behan Webster wrote:
>
> > >>>         I was able to x64 just fine the other day. (I also tried it
> > >>>         with allyesconfig but that (obviously) failed).
> > >>         We don't support all configurations yet. Getting to the point
> > >>         where we are already has taken a lot of work already.
> > >>
> > >>
> > >>     I understand. It was also on of the ideas on the GSoC page to
> > >>     have allyesconfig work. I was just curious how long until the
> > >>     error (longer than I expected; it was a VLAS).
> > >     I would expect allyesconfig would fail very quickly. :)
> > >
> > >
> > > Once I actually went to JOBS=1 that was indeed the case :-D.
> > LOL.
> >
> > >>>             As far as the scope for implementing checker for the
> > >>>             kernel, many of the frequent contributors just have not
> > >>>             had the time to try it. From those who have tried it, we
> > >>>             know it doesn't just work out of the box.
> > >>>
> > >>>
> > >>>         I see. When ever I used the analyzer it was using the
> > >>>         scan-build tool. Need to check whether it works with the
> > >>>         custom build system
> > >>         We don't need to run it on our makefiles. We need it run on
> > >>         the kernel makefiles (Kbuild). The analyzer would be driven
> > >>         by our build system.
> > >>
> > >>
> > >>     The way I understand the system, it basically replaces env
> > >>     variables but allows customization, does error-handling, sets
> > >>     defaults, etc. I was just wondering if it would propagate through
> > >>     down to where the `make` that actually builds the kernel.
> > >     That would be the gig: Figuring this out, then ultimately tuning
> > >     it for the kernel if time permitted (adding specific
> > >     analysis/checks which are Linux kernel specific).
> > >
> > >
> > > Alright, with some experimentation I figured: it does. Well, to some
> > > extent at least. After disabling the hardcoded CC variable in
> > > make-kernel.sh. I was able to run the analyzer using the scan-build
> > > wrapper (ccc-analyzer).
> > Hmm. Maybe it isn't as much work as we thought? :)
>
> sorry to chime in this late, but if you just want to build the kernel
> with the analyzer, it's very simple as i described it some time ago
> (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-October/011742.html):
>
>    the easiest way to run the analyzer is to issue
>    make CC=.../clang C=2 CHECK="clang --analyze"
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20130502/2473d5ed/attachment.html>


More information about the LLVMLinux mailing list