Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-08 Thread Alberto Faria
On Wed, Jul 6, 2022 at 11:15 AM Daniel P. Berrangé wrote: > For clang-tidy, I've been trying it out integrated into emacs > via eglot and clangd. This means I get clang-tidy errors reported > interactively as I write code, so wouldn't need to run a full > tree analysis. Unfortunately, unless I'm m

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-06 Thread Daniel P . Berrangé
On Wed, Jul 06, 2022 at 10:54:51AM +0100, Alberto Faria wrote: > On Tue, Jul 5, 2022 at 5:12 PM Daniel P. Berrangé wrote: > > On Tue, Jul 05, 2022 at 12:28:55PM +0100, Alberto Faria wrote: > > > On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé > > > wrote: > > > > Overall I think a libclang bas

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-06 Thread Alberto Faria
On Tue, Jul 5, 2022 at 5:13 PM Daniel P. Berrangé wrote: > FWIW, after applying this series 'make check' throws lots of failures > and hangs for me in the block I/O tests, so something appears not quite > correct here. I didn't bother to investigate/debug since you marked this > as just an RFC Th

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-06 Thread Alberto Faria
On Tue, Jul 5, 2022 at 5:12 PM Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 12:28:55PM +0100, Alberto Faria wrote: > > On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé > > wrote: > > > for i in `git ls-tree --name-only -r HEAD:` > > > do > > > clang-tidy $i 1>/dev/null

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Sat, Jul 02, 2022 at 12:33:23PM +0100, Alberto Faria wrote: > This series introduces a static analyzer for QEMU. It consists of a > single static-analyzer.py script that relies on libclang's Python > bindings, and provides a common framework on which arbitrary static > analysis checks can be dev

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 12:28:55PM +0100, Alberto Faria wrote: > On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé wrote: > > for i in `git ls-tree --name-only -r HEAD:` > > do > > clang-tidy $i 1>/dev/null 2>&1 > > done > > All of those invocations are probably failing qui

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Alberto Faria
On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé wrote: > for i in `git ls-tree --name-only -r HEAD:` > do > clang-tidy $i 1>/dev/null 2>&1 > done All of those invocations are probably failing quickly due to missing includes and other problems, since the location of the co

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Mon, Jul 04, 2022 at 08:30:08PM +0100, Alberto Faria wrote: > On Mon, Jul 4, 2022 at 5:28 PM Daniel P. Berrangé wrote: > > Have you done any measurement see how much of the overhead is from > > the checks you implemented, vs how much is inherantly forced on us > > by libclang ? ie what does it

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-04 Thread Alberto Faria
On Mon, Jul 4, 2022 at 5:28 PM Daniel P. Berrangé wrote: > Have you done any measurement see how much of the overhead is from > the checks you implemented, vs how much is inherantly forced on us > by libclang ? ie what does it look like if you just load the libclang > framework and run it actross

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-04 Thread Daniel P . Berrangé
On Sat, Jul 02, 2022 at 12:33:23PM +0100, Alberto Faria wrote: > This series introduces a static analyzer for QEMU. It consists of a > single static-analyzer.py script that relies on libclang's Python > bindings, and provides a common framework on which arbitrary static > analysis checks can be dev

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-02 Thread Paolo Bonzini
On 7/2/22 13:33, Alberto Faria wrote: The current primary motivation for this work is enforcing rules around block layer coroutines, which is why most of the series focuses on that. However, the static analyzer is intended to be sufficiently generic to satisfy other present and future QEMU static

[RFC 0/8] Introduce an extensible static analyzer

2022-07-02 Thread Alberto Faria
This series introduces a static analyzer for QEMU. It consists of a single static-analyzer.py script that relies on libclang's Python bindings, and provides a common framework on which arbitrary static analysis checks can be developed and run against QEMU's code base. Summary of the series: - P