Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by dulma on Thursday June 11, 2015 @01:38PM
(#9701123)
On iOS there is the Clang Static analyzer. Infer does some things different,
in particular reasoning that spans across multiple files.
But CSA checks for more kinds of issues and is also more mature than
Infer when it comes to iOS: we send big respect to CSA! Infer has only got started there recently.
Really, these tools complement one another and it would even make
sense to use both. Indeed, that's what we do inside FB!
About null dereferences, they are still a problem in ObjC: if you dereference a nil block it will crash, if you access an instance variable directly or try to pass nil to arrays or dictionaries it will crash. We try to find that kind of bugs.
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by OxO4 on Thursday June 11, 2015 @02:08PM
(#9701290)
Sorry to hijack your comment but it sounds like you are one of the devs of Infer. I am working on static analysis as part of my PhD and I am going to be an intern at Facebook MPK this summer. Are you located at MPK as well? Any chance we could meet up for some coffee at some point?
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by jrmd on Thursday June 11, 2015 @04:06PM
(#9702006)
Part of the team is in MPK. We will happy to have a chat about static analysis once you join us this summer
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by OxO4 on Thursday June 11, 2015 @04:24PM
(#9702144)
Cool! Looking forward to it.
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by tomelliott on Thursday June 11, 2015 @03:20PM
(#9701714)
The team is based in London, but when you get here it should be easy to connect with them.
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by mitchty on Thursday June 11, 2015 @02:47PM
(#9701497)
clang-scan-build/clang-can-view will run anywhere clang runs.
You just need to insert it into your makefiles as an example of the thing that "compiles" stuff.
Its not a huge deal, but just pointing out its most definitely not ios only. :)
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by suyash on Thursday June 11, 2015 @01:27PM
(#9701058)
Yes Android Studio does come with a static checker called 'Lint' and I'm wondering the same. What are infer's advantages over 'Lint' or even 'findbugs'?
Re:Open-sourcing Facebook Infer: Identify bugs before you ship
by dulma on Thursday June 11, 2015 @01:49PM
(#9701188)
Infer finds deeper infer-procedural bugs sometimes spanning multiple files. Linters, in contrast, typically implement simple syntactic checks that are local within one procedure. But they are valuable and Infer doesn't try to duplicate what they are good at. At Facebook we run both Infer and a collection of Android linters.
Findbugs can be useful too; it is more akin to linters.
http://clang-analyzer.llvm.org/
(obviously it supports Java as well, but I assume Android Studio comes with some sort of static analyzer as well, so same question?)
It specifically calls out null pointer exceptions but those... aren't a thing... in Objective-C, messages passed to nil return all 0 bits, and that's okay (unless they mean null dereferences...).