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

Miri does not support file system access #923

Closed
RalfJung opened this issue Aug 26, 2019 · 2 comments
Closed

Miri does not support file system access #923

RalfJung opened this issue Aug 26, 2019 · 2 comments
Labels
A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@RalfJung
Copy link
Member

RalfJung commented Aug 26, 2019

This issue tracks Miri not supporting all sorts of file system access APIs, from working directories to directory listing to actual read/writes. Such access should be possible when -Zmiri-disable-isolation is set. But it will be quite some work to implement dozens of shims for our 3 supported platforms.

If you are running into this, I suggest trying to carve out a part of your library does can run on "pure data", without accessing the file system. That part you should then be able to test in Miri.

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-shims Area: This affects the external function shims labels Aug 26, 2019
@pvdrz
Copy link
Contributor

pvdrz commented Oct 1, 2019

I think this has been covered well enough for unix-like platforms. The current state is that miri can create, write, read and delete files when isolation is disabled: https://github.com/rust-lang/miri/blob/master/tests/run-pass/fs.rs

@RalfJung
Copy link
Member Author

That sounds like a good start, let's use more targeted issues when more APIs get requested.

Thanks a lot @christianpoveda for helming this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

No branches or pull requests

2 participants