Giter Club home page Giter Club logo

Comments (6)

bjorn3 avatar bjorn3 commented on July 20, 2024

You can't call arbitrary C libraries like OpenSSL or libgit2 from inside miri. Miri has shims for most common libc api's, but for anything else you did either have to remove the usage or patch miri to add your own shims. It seems like you are trying to run cargo inside miri. You could try using gitoxide and rustls for git and tls accesses. Cargo already has support for this, but it is disabled by default. I believe there are a couple of env vars you can set. Also I think miri doesn't have any networking support yet.

from miri.

RalfJung avatar RalfJung commented on July 20, 2024

Yeah, Miri does and will not not support calling OpenSSL - sorry. Miri can only check bugs in Rust code, and all C code that you call needs to be re-implemented inside Miri. We do this for some basic platform APIs, but OpenSSL is too big to qualify for that.

from miri.

RalfJung avatar RalfJung commented on July 20, 2024

I wonder if we should have a specific error message for "known to be deliberately not supported" functions that says -- sorry but this is out of scope.

Also I think miri doesn't have any networking support yet.

FWIW that is definitely in scope, I plan for us to have networking support at some point. See #3449.

from miri.

heisen-li avatar heisen-li commented on July 20, 2024

Sorry, my thoughts are: if the problem is due to unsupported calls to APIs such as OpenSSL, it seems like it should be ignored for now and continue with the program later and give a unified reason later.

Also, I'm just getting started with miri and it's not going very well for me (maybe I'm just too dumb), should the user experience be enhanced?

It's just a personal thought, don't take it seriously.

from miri.

bjorn3 avatar bjorn3 commented on July 20, 2024

There is not really a way to ignore it. Miri doesn't know what it could return as dummy value without causing the program to crash immediately or corrupt state in such a way that it will error later in a seemingly unrelated way. Nor does miri know if any of the input pointers will be modified by the call or not.

from miri.

RalfJung avatar RalfJung commented on July 20, 2024

If you are just getting started with Miri, why are you trying to run the cargo test suite inside Miri? That is certainly not the normal mode of use.

The normal mode of use is to install Miri, navigate to your own project, and do cargo miri test there. Miri is made to test libraries that internally use unsafe code, not fully integrated end-user applications like cargo.

from miri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.