Coding

Infer – static analyzer for Java, C, C++, and Objective-C

Infer is a static code analysis tool developed by Meta for detecting potential defects in Java, C, C++ and Objective-C programs. It examines source code without executing the application, helping developers identify problems before they reach production.

The analyser uses a two-stage workflow. First, it captures compilation commands and translates source files into an intermediate representation. It then analyses functions and methods, building summaries that allow it to reason about behaviour across procedure boundaries and source files.

Infer employs several specialised analysis engines. These examine memory safety, resource management, concurrency and other aspects of program correctness. The tool can analyse individual files or larger projects, with options for incremental analysis and comparing results between code revisions.

This is free and open source software.

Key Features

  • Pulse analysis identifies null-pointer dereferences, use-after-free errors and other memory safety problems.
  • Detects memory leaks, resource leaks and invalid accesses to objects.
  • Identifies potential buffer overruns and uses of uninitialised values.
  • RacerD detects potential data races and thread-safety violations.
  • Reports dead stores, unused values and selected redundant operations.
  • Cost analysis estimates computational complexity and identifies potential performance regressions.
  • Supports taint analysis for tracing potentially unsafe data flows.
  • Detects certain infinite recursion and non-termination problems.
  • Configurable analysis engines and issue types.
  • Supports compilation databases and integration with existing build systems.
  • Incremental analysis examines changed code without requiring a complete reanalysis.
  • Differential reporting distinguishes introduced, fixed and pre-existing issues.
  • Generates text and JSON reports, with tools for exploring analysis results.
  • Cross-platform support – runs on Linux and macOS.

Website: github.com/facebook/infer
Support:
Developer: Facebook, Inc. and its affiliates
License: MIT License

Infer is written in OCaml. Learn OCaml with our recommended free books and free tutorials.


Related Software

Java Linter Tools
SpotBugsFind bugs in Java code
PMDExtensible cross-language static code analyzer
Error ProneCatch common Java mistakes
NullAwayEliminate NPEs in Java code
InferStatic analysis tool for Java, C++, Objective-C, and C
CheckstyleWrite Java code that adheres to a coding standard
Checker FrameworkPluggable type-checking for Java

Read our verdict in the software roundup.

C and C++ Linters
OCLintStatic code analysis tool for improving quality and reducing defects
cpplintStatic code checker for C++
CodeCheckerPlatform for running static analysers and managing code defects
UncrustifySource code beautifer
InferStatic analyser that detects bugs in Java, C and C++ code
Include What You UseSource analysis tool for C and C++ projects built on Clang
CppcheckStatic analysis tool for C/C++ code
flawfinderScans C and C++ source code for potential security weaknesses
clazyQt-focused static analyser that catches common C++ mistakes
ClangFormatCode formatting tool
Clang-TidyClang-based C++ “linter” tool
SmatchStatic analysis tool for finding defects in C code
CoccinelleSemantic patching tool for analysing and transforming C code

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted