Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Make CoreRun probe for *.ni.exe files#25592

Closed
MichalStrehovsky wants to merge 2 commits into
dotnet:masterfrom
MichalStrehovsky:coreRun
Closed

Make CoreRun probe for *.ni.exe files#25592
MichalStrehovsky wants to merge 2 commits into
dotnet:masterfrom
MichalStrehovsky:coreRun

Conversation

@MichalStrehovsky
Copy link
Copy Markdown
Member

#10525 regressed loading ni.exe files - after that change, the runtime no longer looks for the .ni.exe variants of .exe files because the .exe is considered trusted.

This regression was worked around in #11272 for crossgen testing, but we still have tests (such as tests\src\readytorun\tests) that are now not testing anything because we're silently falling back to JIT.

This makes corerun add both .exe and .ni.exe into the trusted assembly list.

dotnet#10525 regressed loading ni.exe files - after this change, the runtime no longer looks for the .ni.exe variants of .exe files because the .exe is considered trusted.

This regression was worked around in dotnet#11272 for crossgen testing, but we still have tests (such as tests\src\readytorun\tests) that are now not testing anything because we're silently falling back to JIT.

This makes corerun add both .exe and .ni.exe into the trusted assembly list.
@MichalStrehovsky
Copy link
Copy Markdown
Member Author

@jkotas - what is coreconsole? Seems like it duplicates a bunch of code in corerun, including the part I'm modifying. Do I need to duplicate the fix there? Is coreconsole used?

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Jul 8, 2019

coreconsole is self-contained version of corerun. It gets the name of the assembly to execute from the name of the launched assembly. I do not think it is used by anything.

@janvorli
Copy link
Copy Markdown
Member

janvorli commented Jul 8, 2019

@MichalStrehovsky you'll need to modify the Unix version of corerun too. The code is in src/coreclr/hosts/unixcoreruncommon/unixcoreruncommon.cpp

@MichalStrehovsky
Copy link
Copy Markdown
Member Author

@MichalStrehovsky you'll need to modify the Unix version of corerun too. The code is in src/coreclr/hosts/unixcoreruncommon/unixcoreruncommon.cpp

Oh wow, that code is the same, but also sufficiently different that it's not straightforward to port the Windows version. Also, it's not included in CoreCLR.sln so IntelliSense doesn't work. I'm going to go with a rollback instead - I wanted to do that initially anyway. If the rollback doesn't work out, I'll go through the pain of string manipulation in C++, writing code that I can't build/debug on Windows, and learning Unix filesystem APIs.

Closing in favor of #25606.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants