diff --git a/infer/src/backend/infer.ml b/infer/src/backend/infer.ml index f2eef4b57..40100a203 100644 --- a/infer/src/backend/infer.ml +++ b/infer/src/backend/infer.ml @@ -213,6 +213,8 @@ let capture build_cmd = function ["--project-root"; Config.project_root] @ (if not Config.reactive_mode then [] else ["--reactive"]) @ + (if not Config.continue_capture then [] else + ["--continue"]) @ "--out" :: Config.results_dir :: (match Config.xcode_developer_dir with None -> [] | Some d -> ["--xcode-developer-dir"; d]) @ diff --git a/infer/tests/build_systems/build_integration_tests.py b/infer/tests/build_systems/build_integration_tests.py index 042d6ff60..64074c424 100755 --- a/infer/tests/build_systems/build_integration_tests.py +++ b/infer/tests/build_systems/build_integration_tests.py @@ -470,7 +470,10 @@ class BuildIntegrationTest(unittest.TestCase): 'infer_args': reactive_args}, {'compile': ['clang', '-c', 'hello2.c'], 'infer_args': reactive_args}, - {'compile': ['analyze']}]) + {'compile': ['clang', '-c', 'hello3.c'], + 'infer_args': reactive_args}, + {'compile': ['analyze'], + 'infer_args': ['--reactive']}]) def test_clang_component_kit_analytics(self): test('componentkit_analytics', diff --git a/infer/tests/build_systems/codetoanalyze/hello3.c b/infer/tests/build_systems/codetoanalyze/hello3.c new file mode 100644 index 000000000..a2441062a --- /dev/null +++ b/infer/tests/build_systems/codetoanalyze/hello3.c @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2015 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#include + +void test3() { + int* s = NULL; + *s = 42; +} diff --git a/infer/tests/build_systems/expected_outputs/reactive_report.json b/infer/tests/build_systems/expected_outputs/reactive_report.json index 2fd39e4b3..87b045435 100644 --- a/infer/tests/build_systems/expected_outputs/reactive_report.json +++ b/infer/tests/build_systems/expected_outputs/reactive_report.json @@ -8,5 +8,10 @@ "bug_type": "NULL_DEREFERENCE", "file": "hello2.c", "procedure": "test2" + }, + { + "bug_type": "NULL_DEREFERENCE", + "file": "hello3.c", + "procedure": "test3" } ] \ No newline at end of file