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

version 1.2.0 cannot check resource leak by using pulse(biabduction is deprecated) #1845

Open
u201111476 opened this issue Jun 26, 2024 · 1 comment

Comments

@u201111476
Copy link

I have a file named main.c with some code like this:

#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

int main(int argc, char * argv[])
{
   int data;
    data = -1;
    data = open("BadSource_open.txt", O_RDWR|O_CREAT, S_IREAD|S_IWRITE);
    FILE* data2=fopen("2.txt","r");
  return 0;
}

then I use infer capture -- gcc main.c and infer analyze --pulse,no resource leak result is shown,why?

@Coronon
Copy link

Coronon commented Jun 29, 2024

Same for Java (17) on Apple Silicon M2:

public String test() throws IOException {
    FileOutputStream file = new FileOutputStream("test.txt");
    file.write("Some String".getBytes());
    return "";
}

will not yield any issues when tested with:

infer run --no-filtering -- javac MyFile.java

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

2 participants