From 296a1befee7ccccbe95c8e355ac4e17cf722e4d6 Mon Sep 17 00:00:00 2001 From: Sergey Andreenko Date: Thu, 1 Nov 2018 17:43:17 -0700 Subject: [PATCH] Fix the test. (dotnet/coreclr#20701) As https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.gchandle.free?view=netframework-4.7.2 says "The caller must ensure that for a given handle, Free is called only once.". So delete the second call to `Free()`. I believe it changes the desired behaviour for this test but it was added before 2010 (via source depo) and there are no comments about the regression that it was able to repro, so it is not worth to investigate that. Commit migrated from https://github.com/dotnet/coreclr/commit/61edf4d3200be7c6f59f2558ef5a5773170cfba9 --- src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b13621/b13621.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b13621/b13621.cs b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b13621/b13621.cs index f7dd1fe..ef5ab44 100644 --- a/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b13621/b13621.cs +++ b/src/coreclr/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09/b13621/b13621.cs @@ -45,7 +45,6 @@ namespace DefaultNamespace ~RootMem() { - root[n - 1].Free(); } } } -- 2.7.4