Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34e669c

Browse files
authored
Fix stack overflow on assembly resolution (#3658)
* Fix stack overflow on tp assembly resolution* Feedback
1 parent780b6c4 commit34e669c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/utils/reshapedreflection.fs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,15 @@ module internal ReflectionAdapters =
327327
overridethis.Load(assemblyName:AssemblyName):Assembly=
328328
this.LoadFromAssemblyName(assemblyName)
329329

330-
letglobalLoadContext=new CustomAssemblyResolver()
330+
letglobalLoadContext=
331+
// This is an unfortunate temporary fix!!!!
332+
// ========================================
333+
// We need to run fsi tests on a very old version of the corclr because of an unfortunate test framework
334+
// This hack detects that, and uses the old code.
335+
// On slightly newer code AssemblyLoadContext.Default is the way to go.
336+
match Seq.tryHead(typeof<RuntimeTypeHandle>.GetTypeInfo().Assembly.GetCustomAttributes<AssemblyFileVersionAttribute>())with
337+
| Some awhen a.Version="4.6.24410.01"->new CustomAssemblyResolver():> AssemblyLoadContext
338+
|_-> AssemblyLoadContext.Default
331339

332340
#endif
333341
typeSystem.Reflection.Assemblywith

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp