Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cpp] Biabduction seems not work #1702

Open
5 tasks done
skyleaworlder opened this issue Nov 15, 2022 · 0 comments
Open
5 tasks done

[Cpp] Biabduction seems not work #1702

skyleaworlder opened this issue Nov 15, 2022 · 0 comments

Comments

@skyleaworlder
Copy link

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

Please include the following information:

  • The version of infer from `infer --version: v1.1.0 and the version with hash id "78d361847"
  • Your operating system and version: Ubuntu 20.04
  • Which command you ran:
    > infer run --biabduction-only -- clang++ main.cpp
  • The full output in a paste: see below
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant