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
727 stars 28 forks source link

Infersharp run ending with msg: infersharp/run_infersharp.sh: line 60: 758 Killed #193

Closed GreggSwanson closed 1 year ago

GreggSwanson commented 1 year ago

Infersharp run ending with msg the following log messages:

InferSharp is analyzing: //mnt/c/VS-713/repos/vs.main.uxv/Bin/Debug/net6.0-windows Processing {//mnt/c/VS-713/repos/vs.main.uxv/Bin/Debug/net6.0-windows} 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: 106622 (87%) Method partially translated: 15421 (13%) Instructions translated: 2192167 (77%) Instructions skipped: 671075 (23%)

Code translation completed. Analyzing...

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

Any suggestion on how to address this issue?

matjin commented 1 year ago

This is almost certainly an issue with your machine running out of memory. Your cfg.json is probably multiple GB, right?

One solution is to partition the DLLs/PDBs so that your machine memory doesn't run out...else, running on a larger/more powerful machine would be the other.

GreggSwanson commented 1 year ago

I do not actually have a cfg.json when the run fails.

I provided a smaller number of files that allowed the application to successfully complete execution.