question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When I scan the C# project with the docker container, there seems to be an error, integer overflow, and no vulnerabilities scanned

See original GitHub issue
[root@MiWiFi-R3600-srv Miniblog.Core]# docker run -v /home/Jonas/Project/Miniblog.Core:/infersharp/binary_path --rm mcr.microsoft.com/infersharp:v1.3 /bin/bash -c "./run_infersharp.sh binary_path; cp infer-out/report.txt /infersharp/binary_path/report.txt"
Processing {binary_path}
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: 0 (-2147483648%)
Method partially translated: 0 (-2147483648%)
Instructions translated: 0 (-2147483648%)
Instructions skipped: 0 (-2147483648%)
======================================

Code translation completed. Analyzing...


  No issues found
[root@MiWiFi-R3600-srv Miniblog.Core]# docker run -v /home/Jonas/Project/Miniblog.Core:/infersharp/Examples -it mcr.microsoft.com/infersharp:v1.3
root@9facf129f394:/infersharp# ./run_infersharp.sh Examples
Processing {Examples}
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: 0 (-2147483648%)
Method partially translated: 0 (-2147483648%)
Instructions translated: 0 (-2147483648%)
Instructions skipped: 0 (-2147483648%)
======================================

Code translation completed. Analyzing...


  No issues found

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
m-sedlcommented, Oct 19, 2022

@xi-liu-ds, Hmm. Very strange, but I can’t reproduce the error. Now everything is working properly. Maybe I made a mistake yesterday when launching on macos. I’m sorry for the inconvenience.

My docker desktop version is 4.12.0 My parameters: image

1reaction
xinshiMSFTcommented, Oct 17, 2022

@m-sedl, thank you so much for providing the detailed repro steps!

We recently updated the script to speed up the binary copying process (https://github.com/microsoft/infersharp/commit/bc6fb62d01115a6edc81ad46e15d75934be1fa68). Instead of copying everything from a user-specified folder, the script only copies the .dll and pdb files and flattens the structure.

.NET produces Examples.dll under the Examples/ref folder after dotnet publish. However, it is not the matching .dll file with Examples/Examples.pdb. On Linux, the script probably copied Examples/ref/Examples.dll and Examples/Examples.pdb first, then ignored Examples/Examples.dll. It is probably why you are seeing a SymbolNotMatchingException.

I don’t have a Mac, but I am guessing the reason you are not seeing it on MacOS is that the copying behavior is different. It probably copied the matching Examples/Examples.dll and Examples/Example.pdb first, then ignored Examples/ref/Examples.dll.

I made a PR https://github.com/microsoft/infersharp/pull/179 so that the copying behavior becomes consistent across different OSs. Would you mind updating run_infersharp.sh in your local docker container and try again?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to docker scan: "failed to get DockerScanID"
I execute <$ sudo docker scan second-time>. and I get the error <failed to get DockerScanID: bad status code “400 Bad Request”>. trying...
Read more >
Too many vulnerabilities in Docker image · Issue #2425
I checked all the binaries binaries being installed in Dockerfile and none of them dynamically link against libc. To Reproduce. Follow https:// ...
Read more >
18 security vulnerabilities when scanned with Clair #1878
Steps to reproduce the issue Download latest LTS dotnet core 3.1 docker image Scan with Clair Expected behavior no CVEs detected (0) Actual ......
Read more >
Why does integer overflow cause errors with C++ iostreams?
iostreams is designed to detect errors and enter an error state. ... Just tried this code and it does seem to be setting...
Read more >
Klar analysis always returns "contains NO unapproved ...
Summary Klar analysis always returns "contains NO unapproved vulnerabilities", even though the image has vulnerabilities.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found