-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Execute x64 CoreCLR tests dlls on arm32 #31793
Comments
cc @trylek ? |
@gbalykov - can you please clarify whether you're using AOT (Crossgen-compiled) or MSIL code when running the tests? I believe that, when Crossgen compiles MSIL, it checks the architecture word in the PE header and refuses to compile in case of mismatch i.e. it shouldn't let you compile MSIL claiming to be targeting x64 to native code targeting arm32. AFAIK CoreCLR tests are run via corerun.exe - I'm not sure if it's internally checking the architecture word in the PE header but at the very least I'm not aware of any recent changes to the tool. Also, are you observing this in a local or lab run? If it's a lab run, could you please share a link? We're currently tracking several issues blocking arm runs in the consolidated runtime repo. |
Simpler example is to try to launch x86 tests dlls on x64 runtime, result is the same as for x86/x64 tests dlls on armel.
I've built runtime using next commands on Ubuntu 18.04:
After running ildasm on these two dlls diff is only in the next lines:
On previous versions we were able to execute tests, which were built for x86, on armel and vice versa. For example, I can successfully launch CoreCLR 3.0 armel test dll (BitTest.exe) on the latest x64 dotnet/runtime. ildasm shows diff of that old armel built BitTest.exe with newest x64 built BitTest.dll only in these lines:
So I wonder, what has changed. |
It looks like the test build process on x86 now sets 32BITREQUIRED. Maybe it didn't before? |
It looks like the armel example is from before we switched to using SDK-style projects. The switch to using the SDK may have changed how some things were set. I’ll take a look. |
@jkoritzinsky Do you have any update on this? |
I've checked the difference between old and new dlls. If I try to launch crossgen2.dll built for arm on x64, I get to the next lines in assembly.cpp and ERROR_BAD_FORMAT is thrown:
Here If I try to launch old tests dll (CLR 3.0) built for armel on x64, I get to the same lines with This difference between dlls comes from Both dlls are |
After #25761
Why is this change required? |
It should not be required, for majority of test projects at least. |
Is the same true for crossgen2? I.e. can it be built for one arch and used on another? |
The managed binaries of crossgen2 driver are platform neutral. The unmanaged JIT binaries loaded by crossgen2 are not. So that makes crossgen2 to be platform specific as a whole. |
I was wondering about managed part, so that's great to hear, thank you. There is the same problem currently with incorrect format of crossgen2.dll, I'm investigating. |
Related to #33066 |
This should be addressed. Please reopen if the problem comes up again |
Previously, CoreCLR tests dlls, built for x64, could be executed on arm32, but now there is an error:
Could you, please, describe what has changed?
cc @alpencolt
The text was updated successfully, but these errors were encountered: