I have entered an issue & patch for this, but I wanted to bring it to the devs’ attention because I was hoping to get the fix in for 3.2 as it has been blocking some of our testing.
http://code.google.com/p/mb-unit/issues/detail?id=704
The problem is that when running on a 64bit OS, attempting to load/run a mixed mode x86 assembly (all C++ test assemblies compiled x86) causes the host to crash with a BadImageFormatException. This happens because the runner misidentifies the assembly and incorrectly launches the AnyCPU host instead of the x86.
It is misidentified because mixed mode assemblies don’t set the 32BIT corflags in the header, instead you need to look at a combination of the PE and ILONLY flags. More information is in the issue and at http://blogs.msdn.com/b/slessard/archive/2010/04/09/types-of-managed-code-assemblies.aspx
The fix turned out to be pretty easy, It was just a one line change to AssemblyMetadata to take into account the additional flags. The patch and a test solution is attached to the issue. I have tested the fix on a 64bit OS with C# and C++ test suites compiled x86 and x64.
Any chance of getting this fix in for the release?
Thanks
Rob Prouse
--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gallio-dev?hl=en.
I have entered an issue & patch for this, but I wanted to bring it to the devs’ attention because I was hoping to get the fix in for 3.2 as it has been blocking some of our testing.
http://code.google.com/p/mb-unit/issues/detail?id=704
The problem is that when running on a 64bit OS, attempting to load/run a mixed mode x86 assembly (all C++ test assemblies compiled x86) causes the host to crash with a BadImageFormatException. This happens because the runner mis-identifies the assembly and incorrectly launches the AnyCPU host instead of the x86.
It is mis-identified because mixed mode assemblies don’t set the 32BIT corflags in the header, instead you need to look at a combination of the PE and ILONLY flags. More information is in the issue and at http://blogs.msdn.com/b/slessard/archive/2010/04/09/types-of-managed-code-assemblies.aspx
ECHO....ECHO... Echo.... echo...
Sorry for the dupe, I had originally sent from an email address that is not
subscribed. The email didn't show up after a few hours, so I resent. I guess
the original eventually made its way through ;)
-----Original Message-----
From: galli...@googlegroups.com [mailto:gallio-dev@googlegroups.com] On
Behalf Of Graham Hay
Sent: Friday, August 13, 2010 5:41 AM
To: gallio-dev
Subject: Re: Testing mixed mode x86 assemblies throw BadImageFormatException
Is there an echo in here? :)
--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+unsubscribe@googlegroups.com.