Skip to content

Support for accessing host environment variables #670

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

Closed
cuviper opened this issue Mar 28, 2019 · 2 comments
Closed

Support for accessing host environment variables #670

cuviper opened this issue Mar 28, 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

@cuviper
Copy link
Member

cuviper commented Mar 28, 2019

Miri currently starts with an empty environment, as noted on Evaluator::env_vars:

/// Miri does not expose env vars from the host to the emulated program.

It would be nice to have some control over this from the command line, as suggested on reddit
by /u/0b_0101_001_1010.

Possible inspirations:

  • docker run -e / --env / --env-file (ref)
  • sudo -E / --preserve-env (ref)
@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 Mar 29, 2019
@RalfJung
Copy link
Member

Related to #800.

@RalfJung RalfJung changed the title Support for initializing environment variables Support for accessing host environment variables Jun 29, 2019
@RalfJung
Copy link
Member

With #894, you can pass -Zmiri-enable-communication to let the interpreted program access host environment variables.

The name of that flag is still up for debate; let's discuss that in #800 though.

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