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

Strange behavioral from 'std::env' when calling Rust program from C++ Program #88108

Open
PooyaEimandar opened this issue Aug 17, 2021 · 1 comment
Labels
A-process Area: std::process and std::env C-bug Category: This is a bug. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@PooyaEimandar
Copy link

I port an application from C++ to RUST which is responsible to parse the input arguments and then do some actions.
I tried to call this RUST application from another C++ application via CreateProcess function.
But something strange happened, I think the lifetime of passing parameters in C++ affects on Rust program.
My rust program receives the arguments in C++ Debug mode successfully but it could not received same arguments in Release mode of C++.
I think std::env of Rust should work isolated from parent process, am I right?

Related issue #44650

rustc --version --verbose:

rustc 1.54.0 (a178d0322 2021-07-26)
binary: rustc
commit-hash: a178d0322ce20e33eac124758e837cbd80a6f633
commit-date: 2021-07-26
host: x86_64-pc-windows-msvc
release: 1.54.0
LLVM version: 12.0.1
@PooyaEimandar PooyaEimandar added the C-bug Category: This is a bug. label Aug 17, 2021
@ChrisDenton
Copy link
Contributor

Yes, processes are separate. Would it be possible to provide an example of this bug? I mean a small C++ program and a small Rust program that shows the problem. This would make it easier to investigate the problem.

@ChrisDenton ChrisDenton added the needs-triage-legacy Old issue that were never triaged. Remove this label once the issue has been sufficiently triaged. label Jul 16, 2023
@workingjubilee workingjubilee added the A-process Area: std::process and std::env label Jul 22, 2023
@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage-legacy Old issue that were never triaged. Remove this label once the issue has been sufficiently triaged. labels Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-process Area: std::process and std::env C-bug Category: This is a bug. S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants