Skip to content

Conversation

dungpa
Copy link
Contributor

@dungpa dungpa commented Dec 16, 2016

Fix #485.

This PR uses the repro by @forki (hope he doesn't mind :) )

See previous discussion at #1861.

@forki
Copy link
Contributor

forki commented Dec 16, 2016

That's why I did it ;-) awesome

Copy link
Contributor

@forki forki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good

@KevinRansom
Copy link
Contributor

One test failed, not sure how it is related though:

+++ CodeGen\EmittedIL\TestFunctions (TestFunction10.fs - NetFx40) +++
POSTCMD: [..\CompareIL.cmd TestFunction10.exe NetFx40]

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>REM == TestFunction10.exe --> assembly 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>REM == NetFx40 --> NetFx20|NetFx40 (default is NetFx20) - case insensitive 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>REM ==  --> directory 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if not '' == '' (set dll=\TestFunction10.exe ) 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if '' == '' (set dll=TestFunction10.exe ) 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>REM

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>rem compute the location of ildasm 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>rem

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if exist "" set WINSDKNETFXTOOLS_X86= 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if not "" == "" goto :havesdk 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>set REGEXE32BIT=reg.exe 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.2\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 
ERROR: The system was unable to find the specified registry key or value.

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\WOW6432Node\Microsoft\Microsoft SDKs\NETFXSDK\4.6.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\Microsoft\Microsoft SDKs\NETFXSDK\4.6\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>if "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\" == "" FOR /F "tokens=2* delims=	 " %A IN ('reg.exe QUERY "HKLM\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools" /v InstallationFolder') DO SET WINSDKNETFXTOOLS_x86=%B 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\ildasm.exe" /TEXT /LINENUM /NOBAR TestFunction10.exe  1>TestFunction10.il 
error : File 'TestFunction10.exe' not found or not a PE file

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>IF NOT ERRORLEVEL 0 exit 1 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>IF /I "NetFx40" == "NetFx40" goto :NetFx4 

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>..\..\..\..\testenv\bin\ILComparer.exe "TestFunction10.il.netfx4.bsl" "TestFunction10.il" 
Files differ at line 1:
	>> .assembly extern mscorlib
	>> {
	>>   .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
	>>   .ver 4:0:0:0
	>> }
	>> .assembly extern FSharp.Core
	>> {
	>>   .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )                         // .?_....:
	>>   .ver 4:0:0:0
	>> }
	>> .assembly TestFunction10
	>> {
	>>   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
	>>                                                                                                       int32,
	>>                                                                                                       int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) 
	>>   .hash algorithm 0x00008004
	>>   .ver 0:0:0:0
	>> }
	>> .mresource public FSharpSignatureData.TestFunction10
	>> {
	>> }
	>> .mresource public FSharpOptimizationData.TestFunction10
	>> {
	>> }
	>> .module TestFunction10.exe
	>> .imagebase 0x00400000
	>> .file alignment 0x00000200
	>> .stackreserve 0x00100000
	>> .subsystem 0x0003       // WINDOWS_CUI
	>> .corflags 0x00000001    //  ILONLY
	>> .class public abstract auto ansi sealed TestFunction10
	>>        extends [mscorlib]System.Object
	>> {
	>>   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
	>>   .method public static int32  TestFunction10(int32 p_0,
	>>                                               int32 p_1) cil managed
	>>   {
	>>     .maxstack  4
	>>     .locals init ([0] class [mscorlib]System.Tuple`2<int32,int32> p,
	>>              [1] class [mscorlib]System.Tuple`2<int32,int32> V_1,
	>>              [2] int32 y,
	>>              [3] int32 x)
	>>     .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}'
	>>     .line 5,5 : 5,18 
	>>     IL_0000:  ldarg.0
	>>     IL_0001:  ldarg.1
	>>     IL_0002:  newobj     instance void class [mscorlib]System.Tuple`2<int32,int32>::.ctor(!0,
	>>                                                                                           !1)
	>>     IL_0007:  stloc.0
	>>     IL_0008:  nop
	>>     IL_0009:  ldloc.0
	>>     IL_000a:  stloc.1
	>>     IL_000b:  ldloc.1
	>>     IL_000c:  call       instance !1 class [mscorlib]System.Tuple`2<int32,int32>::get_Item2()
	>>     IL_0011:  stloc.2
	>>     IL_0012:  ldloc.1
	>>     IL_0013:  call       instance !0 class [mscorlib]System.Tuple`2<int32,int32>::get_Item1()
	>>     IL_0018:  stloc.3
	>>     .line 6,6 : 5,8 
	>>     IL_0019:  ldloc.3
	>>     IL_001a:  ldloc.2
	>>     IL_001b:  add
	>>     IL_001c:  ret
	>>   } // end of method TestFunction10::TestFunction10
	>> } // end of class TestFunction10
	>> .class private abstract auto ansi sealed '<StartupCode$TestFunction10>'.$TestFunction10
	>>        extends [mscorlib]System.Object
	>> {
	>>   .method public static void  main@() cil managed
	>>   {
	>>     .entrypoint
	>>     .maxstack  8
	>>     IL_0000:  nop
	>>     IL_0001:  ret
	>>   } // end of method $TestFunction10::main@
	>> } // end of class '<StartupCode$TestFunction10>'.$TestFunction10
	<< EOF

D:\j\workspace\release_ci_pa---3f142ccc\tests\fsharpqa\Source\CodeGen\EmittedIL\TestFunctions>exit /b 1 
Fail to execute the POSTCMD. FAIL

@dungpa
Copy link
Contributor Author

dungpa commented Dec 16, 2016

I also think it's not related.

@dotnet-bot test this please

@KevinRansom KevinRansom merged commit fd03dab into dotnet:master Dec 17, 2016
@KevinRansom
Copy link
Contributor

@dungpa

Thank you for adding this.

Kevin

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants