different behaviors of mixed-mode assembly under .net/wine-mono/native mono.

Hin-Tak Leung htl10 at users.sourceforge.net
Sat Aug 22 12:05:19 CDT 2015


------------------------------
On Sat, Aug 22, 2015 5:07 PM BST Vincent Povirk wrote:

>> Is it possible to enable win32 mono's mixed mode support at runtime,
>> or does it requires a re-compile?
>
>I'm not sure, but I think there is a switch to mono.exe.
>

Hmm, I just read the linux mono man pages... don't know where the win32-specfic
features of mono might be documented. I'll try to find out.

>> The two ldarg.s look invalid to me, but it is possible that Cecil is getting
>> confused in the same way as mono.
>
>The solution is probably to modify the JIT compiler in wine-mono to
>accept this code.

If you feel like looking into this issue, the application concerned
is Microsoft's font validator:
https://www.microsoft.com/typography/FontValidator.mspx

The LTSH and hdmx, vdmx table tests and the rasterization test (on a different tab)
throws illegal IL code exception captured in its report. You can de-select
the other tests which don't matter. To use, click "add font" under the options,
load up any truetype font, and click the 'tick" symbol to start. The XML viewer
doesn't work under wine - COM/ActiveX and IE - so you probably want to save
the report and read it as text.

The exceptions are thrown in the truetype.dll as:

Invalid IL code in Avalon.Media.Text.TrueType.RasterInterf:CalcDevMetrics (int,int,int,uint16,byte[],uint16,byte,byte,uint16[],uint16[],uint16,Avalon.Media.Text.TrueType.RasterInterf/UpdateProgressDelegate): IL_039a: ldarg.s 

Invalid IL code in Avalon.Media.Text.TrueType.RasterInterf:RastTest (int,int,int[],single,single,single,single,single[2],Avalon.Media.Text.TrueType.RasterInterf/RastTestErrorDelegate,Avalon.Media.Text.TrueType.RasterInterf/UpdateProgressDelegate): IL_0098: ldarg.s 

if you don't even want to run it :-).

As I said it works correctly under wine + .net 2, and throws the "correct" error
under linux mono and win32 mono about not being able to initialize the constructor
of an object around native code, so both behaviors are "expected".

I have a command-line wrapper around the Font Validator to make batch testing
easier, though I don't expect it is of any use for looking at the IL code issue?





More information about the wine-devel mailing list