This project is read-only.
4

Closed

Nonverifiable code generated with units of measure conversion

description

[Code originally provided via fsbugs report]

Build the attached library with VS 2012 or VS 2013 (i.e. F# 3.0 or 3.1) and the resulting DLL does not pass PEVerify.

VS 2013 errors are:
Microsoft (R) .NET Framework PE Verifier.  Version  4.0.30319.33440
Copyright (c) Microsoft Corporation.  All rights reserved.

[IL]: Error: [TestLibrary.dll : TestLibrary::test3][offset 0x0000000A][found ref 'Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32]'][expected ref 'Microsoft.FSharp.Core.FSharpTypeFunc'] Unexpected type on the stack.

[IL]: Error: [TestLibrary.dll : TestLibrary::test4][offset 0x0000000A][found ref 'Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32]'][expected ref 'Microsoft.FSharp.Core.FSharpTypeFunc'] Unexpected type on the stack.

[IL]: Error: [TestLibrary.dll : TestLibrary::test5][offset 0x0000000A][found ref 'Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32]'][expected ref 'Microsoft.FSharp.Core.FSharpTypeFunc'] Unexpected type on the stack.

[IL]: Error: [TestLibrary.dll : TestLibrary::test6][offset 0x0000000A][found ref 'Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32]'][expected ref 'Microsoft.FSharp.Core.FSharpTypeFunc'] Unexpected type on the stack.

4 Error(s) Verifying .\bin\Debug\TestLibrary.dll

file attachments

Closed Oct 17, 2014 at 9:17 PM by latkin

comments

BillHally wrote Jun 24, 2014 at 12:35 PM

This appears to be related to be the same issue as BadImageFormatException in Debug with Units of Measure.

latkin wrote Oct 17, 2014 at 9:16 PM

PR has been applied, I can confirm fixed with 26073c3ec0

d79ima wrote Mar 21, 2015 at 7:08 PM

when will this fix be available in an official release?
Would it be available in a release for VS2013 or only in F# 4.0?

Thanks.

latkin wrote Mar 24, 2015 at 8:53 PM

Hi @d79ima - the fix will most likely only be available in F# 4.0