-
Notifications
You must be signed in to change notification settings - Fork 402
Environ shim #1208
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
Environ shim #1208
Conversation
That is curious. Could you please add a testcase demonstrating the problem? |
No I think what you did makes sense. There's just multiple parties that care about this particular allocation. |
sure, check 18f0339 |
|
What remains is to deallocate the old memory, and to add a test that make sure it got deallocated. |
|
☔ The latest upstream changes (presumably #1209) made this pull request unmergeable. Please resolve the merge conflicts. |
How can I do that? |
|
Yeah it's a bit tricky... it has to be a compile-fail test I think. |
That sounds really nasty... I like it |
b069f06 to
d868712
Compare
|
Looking great, thanks. :) @bors r+ |
|
📌 Commit 8392a0c has been approved by |
|
☀️ Test successful - checks-travis, status-appveyor |
| /// Place where the `environ` static is stored. Lazily initialized, but then never changes. | ||
| pub(crate) environ: Option<MPlaceTy<'tcx, Tag>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized we already have the EnvVars struct for extra state for environment variables... @christianpoveda would you mind submitting a follow-up PR to move environ over to that struct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
Remake of #1147. There are three main problems with this:
update_environis not updatingenvironwhensetenvorunsetenvare called. Even then it works during initialization.update_environ.environplace intoMemoryExtraas a field to update it. I was thinking about changingextern_staticsto store places instead ofAllocIDs to avoid this.@RalfJung
Fixes #756