microsoft / infersharp

Infer# is an interprocedural and scalable static code analyzer for C#. Via the capabilities of Facebook's Infer, this tool detects null dereferences, resource leaks, and thread-safety violations. It also performs taint flow tracking to detect critical security vulnerabilities like SQL injections.
MIT License
735 stars 29 forks source link

Crash in the beginning of code analysis: cannot create special file #186

Open SukharevAndrey opened 2 years ago

SukharevAndrey commented 2 years ago

Hello.

I've installed the latest release of InferSharp as a Visual Studio 2022 extension. Then I've tried to to analyze my work project using it, but in the beginning of code analysis stage the process has crashed.

Here are the logs:

InferSharp is analyzing: //mnt/c/work/workProject
Processing {//mnt/c/work/workProject}
Copying binaries to a staging folder...

Code translation started...
Translation stage 1/3: Loading binaries.
Translation stage 2/3: Computing type environment.
Translation stage 3/3: Computing control-flow graph.

Coverage Statistics:

Method successfully translated: 189572 (93%)
Method partially translated: 14733 (7%)
Instructions translated: 3775377 (58%)
Instructions skipped: 2732729 (42%)
======================================

Code translation completed. Analyzing...

Capturing using JSON mode...
Methods analyzed: 0
Methods analyzed: 0
Methods analyzed: 0
infersharp/run_infersharp.sh: line 52:  1826 Killed                  infer run $infer_args --cfg-json infer-staging/cfg.json --tenv-json infer-staging/tenv.json

cp: cannot create special file '//mnt/c/work/workProject/infer-out/sqlite_write_socket': Operation not supported

What can I do to resolve that "Operation not supported" error? Thanks.

matjin commented 2 years ago

Hello! Thanks for posting this issue. If you run the analysis on the infersharp/Examples/ project (open the .sln and build it) do you see this issue?

SukharevAndrey commented 2 years ago

@matjin I've tried it, and it have successfully analyzed example project.

matjin commented 2 years ago

OK. I wonder if it is a memory issue. It's possible that the storage of the CFG in your system's memory caused the crash. Can you try running the analysis on parts of your project?