A static analyzer for Java, C, C++, and Objective-C

Overview

logo

Infer build website

Infer is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in OCaml.

Installation

Read our Getting Started page for details on how to install packaged versions of Infer. To build Infer from source, see INSTALL.md.

Contributing

See CONTRIBUTING.md.

License

Infer is MIT-licensed.

Note: Enabling Java support may require you to download and install components licensed under the GPL.

Comments
  • [java] add tests documenting the dependencies analysis mode

    [java] add tests documenting the dependencies analysis mode

    This pull request adds a test to document the --dependencies options triggering the analysis of the classes appearing in the Java classpath. This feature is especially useful when analysing JAR files packaging all the code of a Java application including the dependencies.

    The examples added in the test are outlining how running the Pulse taint analysis with the dependencies mode enabled can eliminate cases of false negatives and cases of false positives.

    All the tests are passing locally.

    CLA Signed 
    opened by jeremydubreil 49
  • Failed to build iOS project,how to fix

    Failed to build iOS project,how to fix

    I use : infer --incremental -- xcodebuild -workspace xxx.xcworkspace -scheme xxx -sdk iphonesimulator -configuration Debug -destination 'platform=iOS Simulator,OS=9.2,name=iPhone 6s' CLANG_ENABLE_MODULES=NO clean build

    The following build commands failed: CompileC /Users/jianzhang/Library/Developer/Xcode/DerivedData/xxxxxxxx-aiaocxwzriymuzayasydwppoqjls/Build/Intermediates/Pods.build/Debug-iphonesimulator/MQTTKit.build/Objects-normal/x86_64/logging_mosq.o MQTTKit/libmosquitto/logging_mosq.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Traceback (most recent call last): File "/usr/local/bin/infer", line 178, in main() File "/usr/local/bin/infer", line 142, in main capture_exitcode = imported_module.gen_instance(args, cmd).capture() File "/usr/local/Cellar/infer/0.8.0/libexec/infer/lib/python/inferlib/capture/xcodebuild.py", line 78, in capture utils.stdout(exc.output) File "/usr/local/Cellar/infer/0.8.0/libexec/infer/lib/python/inferlib/utils.py", line 298, in stdout print(encode(s, errors=errors)) File "/usr/local/Cellar/infer/0.8.0/libexec/infer/lib/python/inferlib/utils.py", line 294, in encode return u.encode(encoding=config.LOCALE, errors=errors) AttributeError: 'NoneType' object has no attribute 'encode'

    opened by yanqi8573 30
  • infer failed in Xcode9: infer xcodebuild output error - *** Infer needs a working compilation command to run

    infer failed in Xcode9: infer xcodebuild output error - *** Infer needs a working compilation command to run

    My project is created by Objective-C. And infer v0.12.0 was run successfully for my project in xcode 8 yesterday. Today I update my xcode to xcode 9, use some APIs in iOS 11, and update infer to v0.12.1. Then when I run infer v0.12.1 on Xcode 9 with iOS 11 and LLVM v9.0.0 using the following command:

    infer -- xcodebuild -workspace myProject.xcworkspace -scheme myProject -configuration Debug -sdk iphonesimulator
    

    I got the following results:

    Build Succeeded
    Starting translating 463 files 
    
    *** ERROR: Failed to execute compilation command. Output:
    clang: error: cannot specify -o when generating multiple output files
    *** Infer needs a working compilation command to run.
    

    ..MANY OF THESE ERRORS...then...

    ...
    *** ERROR: Failed to execute compilation command. Output:
    clang: error: cannot specify -o when generating multiple output files
    *** Infer needs a working compilation command to run.
    ..
    
    Nothing to compile. Try running `xcodebuild -workspace myProject.xcworkspace -scheme myProject -configuration Debug -sdk iphonesimulator clean` first.
    
    There was nothing to analyze.
    
    opened by tianshunjian 29
  • Migrate Website to Docusaurus 2 Alpha

    Migrate Website to Docusaurus 2 Alpha

    Hi there! The Docusaurus team is currently developing Docusaurus 2 and are almost done with an MVP that doesn't include translations and versioning features, which means there's feature parity with your website's current usage of Docusaurus.

    Docusaurus 2 brings about many improvements:

    • Client-side rendering with prerendering (site renders without JavaScript!)
    • More flexible appearance - Customizable layouts, CSS modules, etc
    • Embeddable interactive React components within markdown via MDX

    I will be helping you migrate and be the POC throughout the migration process. Let me know what you think!

    cc @yangshun @endiliey @wgao19

    opened by mishal23 28
  • (Unix.Exit_or_signal (Exit_non_zero 66))

    (Unix.Exit_or_signal (Exit_non_zero 66))

    When I run ./gradlew build, I get a BUILD SUCCESSFUL. When I run infer -- ./gradlew build, I get the following error:

    $ ./gradlew build --stacktrace
    ...
    
    BUILD SUCCESSFUL
    
    ...
    $ infer -- ./gradlew build --stacktrace
    Capturing in gradle mode...
    Running and capturing gradle compilation...
    Nothing to compile. Try running `./gradlew clean` first.
    Uncaught exception:
      
      (Unix.Exit_or_signal (Exit_non_zero 66))
    
    Raised at file "src/error.ml", line 7, characters 20-30
    Called from file "backend/infer.ml", line 455, characters 2-21
    

    I'm running OS X El Capitan Version 10.11.6 and Infer 0.10.0.

    opened by Will5 27
  • Issue Building clang

    Issue Building clang

    I tried building clang after java and got stuck in the process.

    details:

    checking for ant... no checking for buck... no checking for mvn... no checking for ndk-build... no checking for ndk-build... no checking for Python module lxml... ok checking for xcpretty... no configure: saving configure flags to ./config.flags configure: creating ./config.status config.status: creating Makefile.autoconf

    Warning: you are not using a release of Infer. The C and Objective-C analyses require a custom clang to be compiled now. This step takes ~30-60 minutes, possibly more.

    To speed this along, you are encouraged to use a release of Infer instead:

    http://fbinfer.com/docs/getting-started.html

    If you are only interested in analyzing Java programs, simply run this script with only the "java" argument:

    ./build-infer.sh java

    Are you sure you want to compile clang? (y/N) y CMake Warning at cmake/modules/HandleLLVMOptions.cmake:143 (message): -fPIC is not supported. Call Stack (most recent call first): cmake/modules/HandleLLVMOptions.cmake:161 (add_flag_or_print_warning) CMakeLists.txt:497 (include)

    CMake Warning (dev) at projects/libcxx/CMakeLists.txt:15 (project): Policy CMP0048 is not set: project() command manages VERSION variables. Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

    The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
    

    This warning is for project developers. Use -Wno-dev to suppress it.

    clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s' clang: warning: argument unused during compilation: '-s'

    This warning is keeping coming and clang is not built

    Thanks Shreyas

    opened by shreyasmrs 25
  • Confuse how to integrate Infer into our Gitlab CI

    Confuse how to integrate Infer into our Gitlab CI

    I am confused how to integrate Infer into our Gitlab CI pipeline at static analysis stage:

    • To slow I use this command follow the wiki,but still scan whole project 1700+ files when CI Runner checkout the branch every time。
    infer --reactive --continue -- xcodebuild -workspace xxx.xcworkspace -scheme xxx -sdk iphonesimulator10.2 -configuration Debug build
    
    • Can seperate two phases? I just want to analyze the commit files ,but Infer must compile first,and use command infer -- <command> Suppose our CI pipeline include build,test,pre-production,production 4 phase. Assuming there are two jobs in the build phase, the first job is build, the second is static analysis, , and infer - <command> combine two jobs, and make the build phase become slow.

    • Can not set the threshold, analyze the results and throw error so that the pipeline to stop

    Please give me a suggestion how to integrate infer into our CI process correctly,thanks!

    opened by sencho 25
  • `infer -- javac Hello.java` fails to run when the current path contains whitespaces

    `infer -- javac Hello.java` fails to run when the current path contains whitespaces

    I have tried to test infer using Hello.java which was located in Desktop/Hello folder in my mac. And it said "Failed to load any Java source code". (Refer below commands that I tried.).

    CD-RWEERASOORI:Desktop rweerasooriya$ infer -v Infer version v0.1.1 Copyright 2009 - present Facebook. All Rights Reserved.

    CD-RWEERASOORI:Desktop rweerasooriya$ java -version java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

    CD-RWEERASOORI:Desktop rweerasooriya$ cd Hello/ CD-RWEERASOORI:Hello rweerasooriya$ ls Hello.java

    CD-RWEERASOORI:Hello rweerasooriya$ infer -- javac Hello.java Fatal error: exception Failure("Failed to load any Java source code") [ERROR] Failure during frontend, original command was

    [u'inferJ', u'-g', u'-a', 'infer', u'javac', 'Hello.java']

    Traceback (most recent call last): File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferJ", line 19, in stats = analysis.start() File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 632, in start if self.capture() == os.EX_OK: File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 400, in capture return self.run_infer_frontend() File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 391, in run_infer_frontend self.args.analyzer File "/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/inferlib.py", line 318, in run_command raise e subprocess.CalledProcessError: Command '[u'/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/InferJava', u'-results_dir', '/Users/rweerasooriya/Desktop/Hello/infer-out', u'-verbose_out', '/var/folders/x0/_9n0fqgj2zngnvt0642_h384zc4l_4/T/javac_hTItgR.out', u'-models', u'/Users/rweerasooriya/infer-osx-v0.1.1/infer/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2 CD-RWEERASOORI:Hello rweerasooriya$

    bug java 
    opened by randikapw 25
  • javalib incompatibility causes infer -- javac Hello.java to fail with no files analyzed

    javalib incompatibility causes infer -- javac Hello.java to fail with no files analyzed

    the log trace is as below: [email protected]:~/workspace/test$ infer -- javac Hello.java TODO: print error message Starting analysis (Infer version v0.1.0) Fatal error: exception Sys_error("/home/wyw/workspace/test/infer-out/captured: No such file or directory") [ERROR] Failure during create_makefile, original command was

    [u'inferJ', u'-g', u'-a', 'infer', u'javac', 'Hello.java']

    Traceback (most recent call last): File "/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/inferJ", line 19, in stats = analysis.start() File "/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/inferlib.py", line 634, in start self.analyze_and_report() File "/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/inferlib.py", line 613, in analyze_and_report if self.analyze() == os.EX_OK: File "/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/inferlib.py", line 489, in analyze self.args.analyzer File "/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/inferlib.py", line 318, in run_command raise e subprocess.CalledProcessError: Command '[u'/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/InferAnalyze', u'-results_dir', '/home/wyw/workspace/test/infer-out', u'-makefile', u'Makefile', u'-allow_specs_cleanup', u'-models', u'/home/wyw/Downloads/infer-linux64-v0.1.0/infer/infer/bin/../lib/java/models.jar', u'-project_root', '/home/wyw/workspace/test']' returned non-zero exit status 2

    Anyone could explain?

    java 
    opened by wywlds 25
  • Detect instance fields

    Detect instance fields

    Hi again,

    In the checker I am trying to create, I need to know whether a fieldname is an instance field or not. Example:

    class Hello{
      int foo= 0;
    
      public void test(){
        int i = 0;
        i=3+foo; // foo is a an instance field
        System.out.println("ok");
      }
    }
    

    I took a look at the Ident.java_fieldname_is_outer_instance to give me an idea method but I'm not quite sure when appears the string ".this$".

    Do you have any suggestion?

    opened by luiscruz 24
  • Alarm report issue

    Alarm report issue

    Hi Infer team,

    I am making a new checker using the abstract interpretation module of Infer. When reporting alarms, my checker sometimes ignores some of them.

    Here is a brief description of the error reporting part in my checker code.

    let checker { Callbacks.get_proc_desc; proc_name; proc_desc; tenv; } =
      let post = Interprocedural.checker callback get_proc_desc in
      match post with
      | Some post -> 
          (* iteration on found errors *)
          Error.iter (fun e -> 
            Checkers.ST.report_error tenv
              e.proc_name             (* here, I don't use the parameter *)
              e.proc_desc             (* here, I don't use the parameter *)
              "MY CHECKER"
              e.location
              err_description
          ) errors
      | _ -> ()
    

    Basically I followed the tutorial and I think the only differences are the commented parts. ("proc_name" and "proc_desc")

    In my experience, the alarm reporting works well when Infer takes a single file. But it ignores some of them when analyzing multiple files.

    Could you give me an advice?

    Thanks, Kihong

    opened by KihongHeo 23
  • Slides request from ASE' 21

    Slides request from ASE' 21

    Thank you for the codes and repo here!

    I wonder if the slides from ASE' 21 ( http://www0.cs.ucl.ac.uk/staff/J.Brotherston/ASE21/deadlocks_final.pdf ) could be uploaded?

    Really appreciate it!

    opened by ljcppp 0
  • Bump loader-utils from 2.0.3 to 2.0.4 in /website

    Bump loader-utils from 2.0.3 to 2.0.4 in /website

    Bumps loader-utils from 2.0.3 to 2.0.4.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.4

    2.0.4 (2022-11-11)

    Bug Fixes

    Changelog

    Sourced from loader-utils's changelog.

    2.0.4 (2022-11-11)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    CLA Signed dependencies 
    opened by dependabot[bot] 0
  • [Cpp] Biabduction seems not work

    [Cpp] Biabduction seems not work

    Please make sure your issue is not addressed in the FAQ.

    Please include the following information:

    • [x] The version of infer from `infer --version: v1.1.0 and the version with hash id "78d361847"
    • [x] Your operating system and version: Ubuntu 20.04
    • [x] Which command you ran:
      > infer run --biabduction-only -- clang++ main.cpp
      
    • [x] The full output in a paste: see below
    • [x] If possible, a minimal example to reproduce your problem (for instance, some code where infer reports incorrectly, together with the way you run infer to reproduce the incorrect report).

    My code is the same as empty_vector_access:

    #include <iostream>
    #include <vector>
    
    using namespace std;
    
    int foo() {
      const std::vector<int> vec;
      return vec[0];
    }
    
    int main() {
      int elem = foo();
      return 0;
    }
    

    And my output is:

    <summary>Click me</summary>
    Found 1 source file to analyze in /home/lijg/selab/infer-sample-dataset/biabduction/empty_vector_access/cpp/infer-out
    0/1 [................................................................................] 0% 54.246ms
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    0/1 [................................................................................] 0% 59.704ms
    |- [ 0.0s] main.cpp: foo
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    0/1 [................................................................................] 0% 84.284ms
    |- [ 0.0s] main.cpp: main
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    1/1 [################################################################################] 100% 86.928ms
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    |- [ 0.0s] idle
    1/1 [################################################################################] 100% 117ms
    |- [ 0.0s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    |- [ 0.1s] idle
    No issues found  
    

    In fact, not only empty_vector_access, dangling_pointer_dereference and some other issue types of biabductionare also not reported.

    opened by skyleaworlder 0
  • [RacerD] Detecting races in objects contained  in a Map

    [RacerD] Detecting races in objects contained in a Map

    Please include the following information:

    • [x] The version of infer from infer --version.
    • [x] Your operating system and version, for example "Debian 9", "MacOS High Sierra", whether you are using Docker, etc.
    • [x] Which command you ran, for example infer -- make.
    • [x] The full output in a paste, for instance a gist.
    • [x] If possible, a minimal example to reproduce your problem (for instance, some code where infer reports incorrectly, together with the way you run infer to reproduce the incorrect report).

    I've been experimenting with RacerD with a simple Bank class, that stores Accounts in a Map. In this simple version, it fails to detect data races that might occur in concurrent accesses to the same account. Is this expected behaviour?

    @ThreadSafe
    public class Bank {
        private Map<Integer, Account> accounts;
    
        public class Account {
            int balance;
    
            public Account(int balance) {
                this.balance = balance;
            }
    
            public int balance() {
                return this.balance;
            }
    
            public void deposit(int quant) {
                balance += quant;
            }
            
            public boolean withdraw(int quant) {
                if (quant > balance)
                    return false;
                balance -= quant;
                return true;
            }
        }
    
        public Bank(int n) {
            accounts = new HashMap<>();
            for (int i = 0; i < n; i++)
                accounts.put(i, new Account(0));
        }
    
        public int balance(int acc) {
            return this.accounts.get(acc).balance();
        }
    
        public void deposit(int acc, int quant) {
            this.accounts.get(acc).deposit(quant);
        }
    
        public boolean withdraw(int acc, int quant) {
            return this.accounts.get(acc).withdraw(quant);
        }
    }
    
    • Version of infer Infer version v1.1.0

    • Operating system Fedora Linux 36 (Workstation Edition) x86_64 (Downloaded binaries)

    • Command infer run --racerd-only -- javac Bank.java

    • Output

    Capturing in javac mode...
    Found 1 source file to analyze in /home/mane/Proj_Inf/banco_simples/infer-out
    1/1 [################################################################################] 100% 57.59ms
    
      No issues found  
    
    opened by maneBarros 0
  • Is it possible to get a Windows build process going?

    Is it possible to get a Windows build process going?

    Since Microsoft has added support for C#, there is now a huge userbase of primarily Windows-based developers that could make use of Infer. Microsoft has setup a work around by using WSL to run Infer within linux on Windows however it is clunky to use and very hard to scale out to a team of engineers.

    I'd love to know if building binaries for Windows is something that could be added to the Infer pipeline and whether it is a big ask or not.

    Thanks.

    opened by strich 0
  • Suppressing false positives in non-android Java project

    Suppressing false positives in non-android Java project

    Summary of the Problem

    Currently, in an android project, it is possible to use @SuppressLint to suppress false positives. This annotation is only available in android Java projects, but not Java more generally. Perusing infer's changelog, it appears that there once was support for using @SuppressWarnings("infer"), introduced in version 0.8.0. However, that support was removed in version 0.10.0.

    Here is an excerpt from the changelog for version 0.10.0: "[Java] @SuppressWarnings support removed. Use @SuppressLint instead. android.annotation.SuppressLint is only available on Android, but do let us know if that is an issue for you."

    Unless it is an Android project, there doesn't appear to currently be any way to suppress false positives for Java at the level of a method or a class, other than to disable in the configuration for an entire file. Disabling for an entire file is undesirable since actual bugs may be introduced after disabling infer to deal with cases that have been determined by careful inspection to be false positives.

    Desired Solution

    It doesn't need to be a reintroduction of @SuppressWarnings, since I'm assuming there was likely a technical reason for eliminating support for it in version 0.10.0. However, it would be nice if it was possible to suppress false positives at the level of a method in a Java project (that isn't limited to android projects).

    Background Information

    • Version of infer: I'm using Sonatype Lift to run infer, rather than running directly, so not entirely sure of the specific infer version.
    • OS and version: As above, running indirectly as part of Sonatype Lift. From the logs, it appears to likely be some Linux distribution, but not clear which distribution or version.
    • Command: The Sonatype Lift logs indicates: Called: ['infer', 'analyze', '-r', '--no-parameter-not-null-checked', '--keep-going', '--pulse', '--quandary']

    Please make sure your issue is not addressed in the FAQ.

    Please include the following information:

    • [x] The version of infer from infer --version.
    • [x] Your operating system and version, for example "Debian 9", "MacOS High Sierra", whether you are using Docker, etc.
    • [x] Which command you ran, for example infer -- make.
    • [ ] The full output in a paste, for instance a gist.
    • [ ] If possible, a minimal example to reproduce your problem (for instance, some code where infer reports incorrectly, together with the way you run infer to reproduce the incorrect report).
    opened by cicirello 0
Releases(v1.1.0)
  • v1.1.0(Mar 26, 2021)

    This is a new release of Infer, with a binary tarball for Linux. On MacOS, using Homebrew is recommended. Please follow these instructions.

    Frontends

    Build System Integrations

    • Clang upgraded to version 11.0

    Checkers

    • Liveness: properly handle exceptional control flow
    • Pulse:
    • NEW checker Topl(early alpha): An experimental checker framework: write your own analysis as a state machine representing a temporal property over multiple memory objects at once, eg to write a taint analysis. Topl is based on Pulse.
    • Miscellaneous improvements to cost, inferbo, nullsafe, racerd, starvation

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-linux64-v1.1.0.tar.xz
    5f5d453814422e93e2a70998d8946b09a2721628ff427f67ff0123dea87461d4  infer-linux64-v1.1.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v1.1.0.tar.xz(360.56 MB)
  • v1.0.0(Oct 12, 2020)

    This is a binary release of Infer for Linux and MacOS. To use it follow these instructions.

    The Linux binary is built for Ubuntu 18 and may require adjustments to run on other configurations.

    The Mac binary is built for the Catalina version. MacOS users may get an error "developer cannot be verified" and need to allow the app to run manually following these instructions, or alternatively get infer from Homebrew when it is released there.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v1.0.0.tar.xz              
    510eeccc7e6bcc2678ac92a88f8e1cb9c07c3e14d272dcc06834e93845bb120f  infer-linux64-v1.0.0.tar.xz
    4f188959f7c61e2ef3b935c8a9e5e66632d7fcb90c5362336fb8305d4f74d6b7  infer-osx-v1.0.0.tar.xz
    

    Changelog

    Checkers

    AL is now deprecated and may be removed in future versions.

    Annotation Reachability

    • reporting format improvements (the trace is no longer included in the report text, only as metadata)

    Biabduction

    • disable some less-used bug types

    Eradicate

    • remove "Field not mutable" check

    RacerD

    • Now defaults to "angelic" ownership: an unknown function is assumed to return owned objects.
    • No more reports on races on paths rooted on temporary or local variables, as these are unreliably modelled.

    Litho Required Properties: new Java checker to check that all non-optional @Props have been specified when constructing Litho components. Self in Block: new Objective-C checker to detect when an Objective-C block incorrectly captures self Starvation

    • New experimental "global" analysis mode. Enable with --starvation-whole-program

    Miscellaneous improvements to most checkers, in particular Annotation Reachability, Cost Analysis, Eradicate, Inefficient Keyset Iterator, InferBO, Pulse, RacerD, Starvation, and Uninitialized Value.

    Build System Integrations

    • The Gradle integration now captures Java files in parallel
    • New Buck integration for Java, enable with --buck-java-flavor
    • Clang upgraded to version 9.0

    Command Line Interface

    • New subcommand infer help to display information about checkers and issue types.
    • New subcommand infer debug that replaces the uses of infer explore not related to reported issues.
    • --debug no longer disables filtering, you have to pass -g -F to get the previous behaviour back.
    • All disk artefacts (except the Java type environment) are now stored in the SQLite database in infer-out/results.db. The contents of the database can be explored with infer debug.
    • Changed how to select the Buck integration. The old command line interface is still supported but is now deprecated.
      • clang via "flavors", activated with --flavors, now with --buck-clang
      • clang via "compilation DB", activated with --buck-compilation-database, unchanged
      • Java via "genrule", activated with --genrule-master-mode, now with --buck-java
      • Java "without genrules", used to be activated by not specifying any other Buck mode, deleted
      • In addition, there is a new Java integration, activated with --buck-java-flavor
    • The textual version of the report infer-out/bugs.txt has moved to infer-out/report.txt. The bugs.txt file is still created with dummy contents to allow for a smooth transition.
    • Removed the --report-hook option.
    • Properly terminate on Control-C instead of sometimes leaving around zombie processes.
    • Spec files (summaries) are now stored in the database. Explore with infer debug --procedures --procedures-summary.

    Documentation

    • Revamped online documentation for bug types and checkers. See the list of all issue types and the pages for each checker. The infer help command can be used locally to also get this information and more.
    • Access the documentation for previous and future versions online.
    • The https://fbinfer.com/ website now uses Docusaurus 2.

    Internal Changes

    • Folded the facebook-clang-plugins sub-repo inside the infer repository; there is no more git submodule for it.
    • Improve internal documentation of OCaml source code.
    • Build with OCaml 4.11.1 and dune 2.7.1
    • Migrated our Python 2 code to OCaml
    • Split the infer OCaml source code into individual dune libraries.
    • Better defaults for SQLite, and a write daemon to reduce contention.
    • New analysis schedulers that speed up the analysis phase. Enable with --scheduler callgraph or --scheduler restart.
    • Infer no longer builds by default in "opt" mode (optimised, using OCaml’s flambda pass). The default is now "dev", which does not include as many optimisations (hence builds faster) and turns warnings into errors.
    • The starvation checker is now based on SIL instead of HIL.
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v1.0.0.tar.xz(301.07 MB)
    infer-osx-v1.0.0.tar.xz(254.79 MB)
  • v0.17.0(Aug 6, 2019)

    This is a binary release of Infer for Linux and MacOS. To use it follow these instructions.

    Highlights:

    • There’s a new --inefficient-keyset-iterator checker for finding inefficient uses of Java's keyset iterators that retrieve both key and value (on by default).
    • Complete the set of Android thread annotations and Java nullability annotations. Updated artifacts are available on Maven Central.
    • --starvation is now on by default. This analysis catches problems with threads not being able to make progress due to locking issues, incorrect scheduling priorities, etc. For instance, on Android calling Future.get from a UiThread without a sensible timeout will be flagged as a starvation issue.
    • New Objective-C linter for calls to @optional methods: UNSAFE_CALL_TO_OPTIONAL_METHOD, enabled by default.
    • A new call-graph scheduler (--call-graph-schedule) improves performance of the analysis phase of Infer, especially when the number of files to analyze is less than available CPUs.
    • A new flag --oom-threshold allows to throttle the analysis when the amount of free memory is below the provided threshold.
    • New genrule based Buck/Java integration is much faster than the previous one, use with --genrule-master-mode.
    • Infer’s internal clang is now in version 8.0.0.
    • Update to javalib 3.1 provides better compatibility with Java 9 and Java 11. Refer to their change log for more details.
    • Infer can now be built and run on MacOS Mojave without fiddling with SDKROOT (although you still might need it with non-standard toolchain setup).
    • [β] Pulse is a new experimental lifetime analysis for C++, give it a try with --pulse. Beware that it doesn’t report much yet.
    • --ownership checker was superseded by Pulse and removed.

    ... and many other fixes and improvements. For the full list of changes included see here.

    The facebook-clang-plugins version used for this release is https://github.com/facebook/facebook-clang-plugins/commit/9386890e42043d04f9 cd9e7b204cb525d4417c41.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v0.17.0.tar.xz
    de972ba3043f18b29a8eff6cd7612e24f5ffaef038dc7949befeaf490931725e  infer-linux64-v0.17.0.tar.xz
    1a3ef6fb51846ae63ffd7fde3b0255f75bab6157f5de1842606fa32988d101f8  infer-osx-v0.17.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.17.0.tar.xz(251.65 MB)
    infer-osx-v0.17.0.tar.xz(215.90 MB)
  • v0.16.0(Apr 23, 2019)

    This is a binary release of Infer for Linux and MacOS. To use it follow these instructions.

    It's been a long time since the previous release, here are some new features and improvements you can find in this new release:

    Backend analyses:

    • A brand new analysis to compute the runtime cost of methods and functions: passing --cost (off by default) to Infer will output a costs-report.json file describing, among others, the computational complexity of each function in the code using the big-O notation, eg O(1), O(list.length), ...
    • The deadlock detection analysis has been ported to C++ and Objective-C and mainly focuses on self-deadlocks (taking a mutex twice). Activate with --starvation (off by default).
    • The data race detector RacerD has been ported to Objective-C and detects races on fields protected by a C++ mutex. It reports "Thread Safety Violation" and "GuardedBy Violation" errors on Java and "Lock Consistency Violation" on C++ and Objective-C. Activate with --racerd (on by default).
    • A progress bar is displayed while the analysis is running
    • Countless improvements and tweaks, in particular in RacerD and in analyses for C++.

    Frontends:

    • Infer now ships with clang version 7.0.1
    • Support for Java up to version 11

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v0.16.0.tar.xz
    435c415a9a22f41e7f2074b542b035b972a2a8c237d5490285d763bf333a817b  infer-linux64-v0.16.0.tar.xz
    471f06c72754a45d73433623e8092bf9ea1315884b8ebff24d3f79f9a8b0380a  infer-osx-v0.16.0.tar.xz
    

    The facebook-clang-plugins version used for this release is https://github.com/facebook/facebook-clang-plugins/commit/36266f6c86041896bed32ffec0637fefbc4463e0.

    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.16.0.tar.xz(275.26 MB)
    infer-osx-v0.16.0.tar.xz(246.13 MB)
  • v0.15.0(Jun 5, 2018)

    This is a binary release of Infer for Linux and MacOS. To use it follow these instructions.

    Highlights:

    • switch infer license to MIT
    • publish binaries
    • [clang] lots of improvements to the frontend

    More changes in the full list of changes.

    The facebook-clang-plugins version used for this release is https://github.com/facebook/facebook-clang-plugins/commit/f31f7c9c28d8fb9b59c0dacc74a24e4bfe90a904.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v0.15.0.tar.xz
    f6eb98162927735e8c545528bb5a472312e5defcf0761e43c07c73fe214cb18a  infer-linux64-v0.15.0.tar.xz
    0f87b8fd68b62717b8c3c143aeaea38b5102435f80fff484cb570a51cf510f9c  infer-osx-v0.15.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.15.0.tar.xz(241.28 MB)
    infer-osx-v0.15.0.tar.xz(222.36 MB)
  • v0.14.0(Apr 30, 2018)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    Highlights:

    • New checker: --ownership detects a subset of use-after-free issues due to bad manual memory management. This is a rough prototype of Rust-style borrow checker for C++. (enabled by default, C++)
    • New checker: --uninit detects uses of uninitialized values (enabled by default, C/C++/Objective-C)
    • New checker: --racerd now also detects inconsistent lock usage in C++. Also improved the lock domain to reduce false positives for all languages.
    • Improved C++ support: destructors are now properly translated; addresses and pointers are handled more precisely
    • Improved retain cycles detection (Objective-C)
    • Upgraded the internal clang to clang 7
    • [internal] SQLite is being used to store some of infer's analysis artefacts instead of storing them in files on disk. This improves analysis speed and reduces load on the OS.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v0.14.0.tar.xz
    330b4bbb5fbf90c04d4c096ce0d8d713dac72925d68c0e1b55ab30e6d5201bcb  infer-linux64-v0.14.0.tar.xz
    350767bc29acdcb86734a2009e97bdf2a3603db0fbf3f18c59fc07b416977021  infer-osx-v0.14.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.14.0.tar.xz(122.59 MB)
    infer-osx-v0.14.0.tar.xz(115.22 MB)
  • v0.13.1(Feb 2, 2018)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    This is a fix for the 0.13.0 release, whose build broke due to changes in opam.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.13.1.tar.xz
    02ff3c49c83d3a4e967696f8818b1cffcb042c26eefbb2ba8d78c27244b5940c ?infer-linux64-v0.13.1.tar.xz
    182ff5b76ff561408dc52b32611346e097098651a491fb8a0a453a1d098d4299 ?infer-osx-v0.13.1.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.13.1.tar.xz(113.06 MB)
    infer-osx-v0.13.1.tar.xz(97.20 MB)
  • v0.13.0(Oct 19, 2017)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    The main changes are:

    • Infer now runs multiple checkers at the same time by default, including the biabduction analysis that was the previous and only default. In particular, we are pleased to introduce RacerD for race detection in Java. The following checkers are activated by default: annotation reachability (Java), biabduction (C/C++/ObjC, Java), fragment retains view (Java), immutable cast (Java), liveness (C/C++/ObjC), printf args (Java), quandary (C/C++/ObjC, Java), RacerD (C/C++/ObjC, Java), SIOF (C/C++/ObjC). Each checker may report several issue types.
    • Upgraded to clang 5.0
    • Richer DSL for writing linters (AL), and a new default linter for const pointers in Objective-C
    • Lots of perf improvements and bug fixes, and improved logging

    Please note the following breaking changes:

    • -a eradicate is now simply --eradicate and can run alongside other checkers
    • inferTraceBugs is now the explore subcommand: infer explore --help
    • infer now depends on sqlite

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.13.0.tar.xz
    79a7fe8b7a05ea2a685997d9188fef7319c7b3d72064f14dea7a5f23ec50efac ?infer-linux64-v0.13.0.tar.xz
    1abec8df73581d35e018f81285197d82a6f3e6101c528fb8be14405765da155e ?infer-osx-v0.13.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.13.0.tar.xz(112.33 MB)
    infer-osx-v0.13.0.tar.xz(96.94 MB)
  • v0.12.1(Aug 30, 2017)

    This is a hotfix release to update infer's opam dependencies to cope with upgrades of cppo in opam (in particular, #718).

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.12.1.tar.xz
    d26dd519c19345530a92a6ae3f7058af3bd8ddfd7c2c945d116c6fd658be6c4 ?infer-linux64-v0.12.1.tar.xz
    ce76b87bf4f70be594aaddc7402609af6338623fbb448dacca610e10bcb7c60a ?infer-osx-v0.12.1.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.12.1.tar.xz(95.09 MB)
    infer-osx-v0.12.1.tar.xz(79.07 MB)
  • v0.12.0(May 17, 2017)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    This introduces subcommands and man pages for all subcommands. If you are used to infer's command line already, here are some rough equivalences (the commands might not be completely equivalent in some cases):

    • infer [options] -- [build command] becomes infer run [options] -- [build command]
    • infer becomes infer analyze
    • infer -a capture [options] -- [build command] becomes infer capture [options] -- [build command]
    • infer -a compile [options] -- [build command] becomes infer compile [options] -- [build command]

    The previous forms of invocations are still supported but may go away in future releases.

    If you were using them, the internal binaries have disappeared and are replaced as follows:

    • InferPrint [options] becomes infer report [options]
    • InferAnalyze [options] becomes infer analyze [options]

    See man infer, man infer-capture, man infer-analyze, etc. for more details, and let us know if anything is missing.

    This release introduces AL, a language for writing linters against the clang AST. AL lets you check syntactic properties of source code by traversing the AST of the program. Using the included domain-specific language (DSL), you can write your own set of checks.

    As usual, this release also includes lots of fixes and improvements. For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.12.0.tar.xz
    698c9ff83a23fb3d6ffa0d62d5394e691ad5e3352f27bf2d4105afdfd07cc201 ?infer-linux64-v0.12.0.tar.xz
    3b97bcabf85af8feb8d6fd0b8622fe2b4fbf27fa215fab61e3a660b5435b6d21 ?infer-osx-v0.12.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.12.0.tar.xz(94.64 MB)
    infer-osx-v0.12.0.tar.xz(79.24 MB)
  • v0.11.0(Apr 12, 2017)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    Highlights:

    • [Java] ThreadSafety analyzer is now on by default; run it with infer -a checkers .... This checker will try and detect races (unprotected concurrent accesses with at least one write) in classes bearing the @ThreadSafe annotation.
    • Infer now builds using OCaml 4.04.0.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.11.0.tar.xz
    c2a893d66befc2652a28e9e6481f680fe863512f8c507b52616c5731878c22f0 ?infer-linux64-v0.11.0.tar.xz
    0c435efa311cb70a79b5b8ae9cc4e714651e6653c5542a58cc624f2439d68e36 ?infer-osx-v0.11.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.11.0.tar.xz(93.67 MB)
    infer-osx-v0.11.0.tar.xz(79.21 MB)
  • v0.10.0(Feb 23, 2017)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    • [Clang] C++ support.
    • [Clang] Improved support for cmake and Xcode compilation databases. Use with infer --compilation-database compile_commands.json (for cmake and Buck), or with infer --compilation-database-escaped compile_commands.json (for xcbuild and xcpretty).
    • [C++] New SIOF Checker.
    • [iOS] New linter for target SDK version. Use with infer --iphoneos-target-sdk-version <min version you support> ... or with infer -a linters --iphoneos-target-sdk-version <min version you support> ....
    • [Java] New Thread Safety Checker.
    • [Java] Smarter analysis of dynamic dispatch.
    • [Java] Improved Maven integration.
    • [Java] @SuppressWarnings support removed. Use @SuppressLint instead. android.annotation.SuppressLint is only available on Android, but do let us know if that is an issue for you.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.10.0.tar.xz
    62287344459e2e467def603f97dac9cfb335a8f2852a51217696db948164780c ?infer-linux64-v0.10.0.tar.xz
    6fdcfe52cee28f57a86e8cd80bf4cac7b2dda83a3cc511f86834636ada14a808 ?infer-osx-v0.10.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.10.0.tar.xz(122.77 MB)
    infer-osx-v0.10.0.tar.xz(80.86 MB)
  • v0.9.5(Feb 10, 2017)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS.

    This includes a fix for #577.

    To use it follow these instructions.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.5.tar.xz
    199f5cc6466db63375774d20bbea8f50e0394380b7e8b258b73a44c2578b5159 ?infer-linux64-v0.9.5.tar.xz
    43d6c68d4e41057be8188877872544bf7c0e6a53a122be64efe06f3f3b772f47 ?infer-osx-v0.9.5.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.5.tar.xz(142.79 MB)
    infer-osx-v0.9.5.tar.xz(97.43 MB)
  • v0.9.4.1(Nov 23, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions. It only contains hotfix to infer 0.9.4 fixing https://github.com/facebook/infer/issues/508

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.4.1.tar.xz
    860f20741bd54f1e058e0e0c4550fc4211016ef93f154938eb173df555a560df ?infer-linux64-v0.9.4.1.tar.xz
    a738a3492a4e0229df8abd745cd88bca8fb547bc3bcca15ec194d6780b07cbda ?infer-osx-v0.9.4.1.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.4.1.tar.xz(142.77 MB)
    infer-osx-v0.9.4.1.tar.xz(98.16 MB)
  • v0.9.4(Nov 18, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    • [Java] preliminary support for Java 8: infer no longer skips methods containing Java 8 code
    • [clang] support for clang compilation databases
    • [Xcode] more robust integration using the compilation database (requires xcpretty)
    • [iOS] added checks for some of the ComponentKit best practices
    • lots of under-the-hood improvements, including perf improvements and bug fixes

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.4.tar.xz
    1b85b84a5f798919d2630b313033e710b1e20fba24f5c751ca1b5e0a3c601cff ?infer-linux64-v0.9.4.tar.xz
    529d147bccf3285ddb7500c22e0c50d6e0cbdb2c7f9b11a84e8005873994b3e2 ?infer-osx-v0.9.4.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.4.tar.xz(142.78 MB)
    infer-osx-v0.9.4.tar.xz(98.15 MB)
  • v0.9.3(Sep 22, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    • Fix issues with using Infer with Clang 4.0 and Xcode 8
    • Various fixes and performance improvements

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.3.tar.xz
    a55a940082690d06c0c05d8b772b8a9eef8b98ecb0ea82f86e5d473bcf878211 ?infer-linux64-v0.9.3.tar.xz
    8bfbb7ee76388393b5cf513984da79c305af3a1e6bbd057f83082f093d3cc0d7 ?infer-osx-v0.9.3.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.3.tar.xz(80.08 MB)
    infer-osx-v0.9.3.tar.xz(70.72 MB)
  • v0.9.2(Aug 23, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.2.tar.xz
    7c374d14affc19c44cd23746696eba7b4422a900e03f8a6b9985d95a05d2d95f ?infer-linux64-v0.9.2.tar.xz
    3935f8be25982a023aba306b66804d73a7316ab833296277c1ec6c3694bfc7c7 ?infer-osx-v0.9.2.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.2.tar.xz(98.71 MB)
    infer-osx-v0.9.2.tar.xz(87.17 MB)
  • v0.9.1(Aug 18, 2016)

    This is a minor source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. It contains bugfixes to 0.9.0, in particular to enable packaging via Homebrew and to fix an issue with locales. To use it follow these instructions.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.1.tar.xz
    c6dc64db4a6075d4fac32712bbd0e087ecb6d909ac590220acd64bd4a33480c3 ?infer-linux64-v0.9.1.tar.xz
    6dbb1bb7b3e28d99a8c02fd42f2f87894bf0c5564c13645aae679effb8ee8418 ?infer-osx-v0.9.1.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.1.tar.xz(150.96 MB)
    infer-osx-v0.9.1.tar.xz(87.21 MB)
  • v0.9.0(Jul 21, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    Since the changelog is so big, let's just mention these two items:

    • lots of perf improvements and fixes across all analyses (thanks to everyone who reported issues and made pull requests!)
    • [experimental] C++ language support. See --cxx in infer --help. This is still in heavy development and only includes a few bug types. Feedback welcome!

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.9.0.tar.xz
    1596e2d4e67f920349de4950a2b6b98451d5115602826b508eb7b4d8e1b41caf ?infer-linux64-v0.9.0.tar.xz
    3aebf37bbcbb3c17912c24bfd1f2aec7b8d1256f0617cca5ddeab7aeab58b3ce ?infer-osx-v0.9.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.9.0.tar.xz(148.23 MB)
    infer-osx-v0.9.0.tar.xz(87.15 MB)
  • v0.8.1(Apr 25, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    This release includes:

    • [Objective-C and C] upgrade clang to version 3.8.0
    • [all] bugfixes

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.8.1.tar.xz
    7f75ae69d91fb9a8c43163f02a9b2a4919b8ebc42dfb2f729722201a0b18ea6b ?infer-linux64-v0.8.1.tar.xz
    0cd33936966fcb4761251279aa737ca07352fb8a8e864697a1d2cc5735c56ae7 ?infer-osx-v0.8.1.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.8.1.tar.xz(83.26 MB)
    infer-osx-v0.8.1.tar.xz(62.73 MB)
  • v0.8.0(Mar 15, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    • New --reactive mode to rapidly analyze the effects of a code change. Be sure to check out the documentation of the new workflow. As a result, the incremental mode (--incremental) is now deprecated.
    • New XML output, compatible with output from other static analyzers, eg PMD. To use it, pass the --pmd-xml flag to Infer (see infer --help).
    • Use @SuppressWarnings("infer") in your Java projects to annotate methods or classes where Infer shouldn't report.

    This release incorporates a number of contributions (#284 #289 #300 #301) and addresses a number of issues (#279 #281 #283 #288 #291 #294).

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.8.0.tar.xz
    4942ca2c8ad9e76ff6e31c6473b7f360cc95d9db43218dc7747ae34aef6294f4 ?infer-linux64-v0.8.0.tar.xz
    2b494a2b595bd7cf0f0cfaac4e9bece568575a4bcf25cc00161ed34c0319dc58 ?infer-osx-v0.8.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.8.0.tar.xz(62.65 MB)
    infer-osx-v0.8.0.tar.xz(62.82 MB)
  • v0.7.0(Feb 11, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    This release addresses a number of bugs, eg #270 #274 #275 #276. Thanks to all of you who reported bugs!

    There are also new features:

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.7.0.tar.xz
    b8c4f32bc286893aded3302a2915a66fe7e799edbbaf286ffdcc5218866db3ae ?infer-linux64-v0.7.0.tar.xz
    c83753c04bea8ad1dae3877d23d094d963d293b5d926a21ea8ea9443c870404a ?infer-osx-v0.7.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.7.0.tar.xz(62.45 MB)
    infer-osx-v0.7.0.tar.xz(62.80 MB)
  • v0.6.0(Jan 19, 2016)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    New features:

    • [android] fixed intermittent infinite loop
    • [iOS] new check for capturing a C++ reference in an Objective-C block

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 -p infer-*-v0.6.0.tar.xz
    26abc0312c892b53e4b93c22c2c051381ce1012a3d8458e8e2574b27302eec37 infer-linux64-v0.6.0.tar.xz
    8a1c4d0425c0ef3efcf4683cdbeebba63f3dd2fd5e75df4f04142dc9a5a5f15d infer-osx-v0.6.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.6.0.tar.xz(69.43 MB)
    infer-osx-v0.6.0.tar.xz(78.96 MB)
  • v0.5.0(Dec 18, 2015)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    New features:

    • [android] detection of context leaks
    • [android] support for @PerformanceCritical and @Expensive method annotations. Infer will check that an expensive method is never called during the execution of a performance critical method (run it with infer -a checkers -- ...).
    • [iOS] new check to catch strong delegate properties, likely to create retain cycles
    • [iOS] new check to catch direct accesses to atomic properties, which can cause race conditions
    • [all] performance improvements all-around

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ shasum -a 256 infer-*-v0.5.0*.tar.xz
    9d6eefeb63742bd408bc5769e93f34b378b36c0561c8e80035797c1be0c6fc66  infer-linux64-v0.5.0.tar.xz
    6a8547ac0b75a5e2bbeccae2169e39f753a60adbcacb6c94599fd31343a71ce7  infer-osx-v0.5.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.5.0.tar.xz(62.40 MB)
    infer-osx-v0.5.0.tar.xz(62.76 MB)
  • v0.4.0(Oct 13, 2015)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ sha256sum infer-*-v0.4.0.tar.xz
    bb84656153b59ff43f477c2432039195b614ecb5c19ed2a3f73aea7921696730  infer-osx-v0.4.0.tar.xz
    14f6e6d96a450d7acb17de0b26b136851d1b2815edd267e5865ea0af7aaf2887  infer-linux64-v0.4.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.4.0.tar.xz(82.63 MB)
    infer-osx-v0.4.0.tar.xz(88.72 MB)
  • v0.3.0(Aug 20, 2015)

    This is a source release of Infer packaged with pre-built binaries for clang and facebook-clang-plugins for Linux and MacOS. To use it follow these instructions.

    For the full list of changes included see here.

    The sha256 checksums of the tarballs are:

    $ sha256sum infer-*-v0.3.0.tar.xz
    325013468da5b221e81ad3f1ba348e07a87f061c698e46b32d20f94d599ab463  infer-linux64-v0.3.0.tar.xz
    cfd17c647098baff2875f3ff4db994f2ee02e7b5577cde5fe59ee21ec57a2d44  infer-osx-v0.3.0.tar.xz
    
    Source code(tar.gz)
    Source code(zip)
    infer-linux64-v0.3.0.tar.xz(105.22 MB)
    infer-osx-v0.3.0.tar.xz(102.52 MB)
  • v0.2.0(Jun 26, 2015)

    Notable fixes and improvements:

    • [java] analyze class files with $$ in the name (closes #3 more)
    • [java] don't fail on compilation warnings (closes #18)
    • [clang] support __nullable et al. (closes #4)
    • add an Infer:Checkers for printf arguments

    Action required to compile from source when upgrading from a previous version:

    • The version of javalib that Infer requires has changed. You'll need to upgrade it using opam: opam update && opam upgrade. You'll also need to run make -C infer clean before recompiling Infer.
    • The version of the facebook-clang-plugins that Infer requires has changed. You'll need to update the plugins before recompiling Infer: from the directory where Infer sources live, run ./update-fcp.sh && ../facebook-clang-plugin/clang/setup.sh && ./compile-fcp.sh.

    See the full list of changes here.

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Jun 18, 2015)

    This release fixes a number of bugs. Non-exhaustive list below.

    • [java] no more crash on class names containing "$$" (closes #3)
    • [java] model for assert (closes #68)
    • [objective-c] support for @import (closes #2)
    • [c family] Infer now always reports on the right line numbers (closes #31)
    • [c family] fix c++ compilation errors (closes #37)
    Source code(tar.gz)
    Source code(zip)
Owner
Meta
We are working to build community through open source technology. NB: members must have two-factor auth.
Meta
Gradle plugin for Hugo static site generator

gradle-hugo-plugin Wrapper for Hugo static site generator. The plugin provides a declarative approach for the Hugo binary used to build the static sit

François Staudt 10 Jun 28, 2022
Static code analysis plugin for Android project. (Checkstyle, PMD)

Android Check Static code analysis plugin for Android project. Usage Modifications in <project_dir>/build.gradle: buildscript { repositories { jce

Noveo Group 269 Nov 10, 2022
An investigation and comparison between Kotlin and Java on an engineering level

An investigation and comparison between Kotlin and Java on an engineering level. Since beauty is in the eye of the beholder, this repository is not meant to evaluate Java or Kotlin on an aesthetic level.

João Filipe Sabino Esperancinha 13 Nov 2, 2022
🌱 A test implementation of a Minecraft server using RESTful API taking advantage of the interoperability between Kotlin and Java.

?? Norin A test implementation of a Minecraft server using RESTful API taking advantage of the interoperability between Kotlin and Java. This project

Gabriel 1 Jan 4, 2022
Integration-test library for Kotlin and Java

Maya Maya (/ˈmɑːjə/, माया), literally "illusion" or "magic". In Vedic texts it connotes a "magic show, an illusion where things appear to be present,

Konstantin Pavlov 2 Oct 10, 2022
Comparison among Java, Groovy, Scala, Kotlin in Android Development.

中文版 日本語 AndroidDemoIn4Languages A simple Android application written in Java, Groovy, Scala and Kotlin in order to find out what is the better languag

Sidney Xu 196 Nov 11, 2022
Archimedes's implementation for the Java Virtual Machine (JVM)

Archimedes Give me a place to stand, and I shall move the earth. Archimedes's implementation for the Java Virtual Machine (JVM) Building From Source T

Archimedes 24 Aug 20, 2022
An example project for configuring Rust with Java 18's Panama/jextract

rust-panama A template project for setting up both Rust and the Java 18 Panama Foreign Linker API (via jextract). How to Setup Clone the repo. Modify

Aidan 14 Jul 5, 2022
🧚‍♀️ Java library to interact with YouTrack's REST API.

YouTrack Kotlin API ??‍ Kotlin JVM library to interact with YouTrack's REST API. Usage fun main(args: Array<String>) { val youtrack = YouTrack {

Noel 2 Oct 1, 2021
Helper functions for making Approvals-Java more Kotlin friendly

Approvals-Kt Helper functions for making Approvals-Java more Kotlin-friendly Usage Verify using Approvals-Kt import com.github.greghynds.approvals.Kot

Greg Hynds 2 Oct 18, 2021
A java flight recording helper

FlightMemory A java flight recording helper Helper class for production profiling using java flight recorder (JFR) FlightMemory.recordingAsZip(Duratio

Ragnar Rova 1 Oct 31, 2021
Kotlin & Java class for gRPC client

jvm-minter-grpc-class Kotlin & Java class for gRPC client Use @TODO Разное Добавление git subtree add --prefix node-grpc-gateway https://github.com/Mi

Aleksey Kukhnovets 2 May 26, 2022
This project uses Quarkus, the Supersonic Subatomic Java Framework.

foodhouse Project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its websit

null 0 Nov 29, 2021
GraphQL for Java with Spring Boot made easy.

GraphQL for Java with Spring Boot made easy.

Netflix, Inc. 2.5k Nov 26, 2022
Kotlin dropwizard app running on Java 11. With Guice injection loaded.

hello world How to start the hello world application Run mvn clean install to build your application Start application with java -jar target/dropwizar

null 0 Nov 24, 2021
A Kotlin/Java library to connect directly to an Android device without an adb binary or an ADB server

dadb Blog Post: Our First Open-Source Project A Kotlin/Java library to connect directly to an Android device without an adb binary or an ADB server de

mobile.dev 782 Nov 30, 2022
Hexagonal Architecture Java Example

Hexagonal Architecture Dev.to Hexagonal Architecture Article I have been working on many projects that claim to be using the Hexagonal Architecture St

null 14 Oct 27, 2022
A generic library for quick development in Spring Boot using Java Generics.

slinky Now in Kotlin! A generic library for quick development in Spring Boot using Java Generics. Why "slinky"? A slinky is a precompressed helical sp

Paulo Elienay II 33 Nov 17, 2022
This project uses Quarkus, the Supersonic Subatomic Java Framework

api Project This project uses Quarkus, the Supersonic Subatomic Java Framework.

Leonardo Cavazzola 0 Feb 26, 2022