From 23b78592ec0cef9988a54eca480ec433d64fb556 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Thu, 15 Jun 2017 15:55:34 -0700 Subject: [PATCH] Remove static for function pointer qsort with static compare functions crashes with ALTJIT. It appears due to _guard_check_icall_fptr in Windows 10. Simply dropping static keyword works. Commit migrated from https://github.com/dotnet/coreclr/commit/7d12221cbca178280c2f5d576a6fdc538bed35e8 --- src/coreclr/src/jit/compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index d0857fa..d6f99c2 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -6162,12 +6162,12 @@ void Compiler::compInitVarScopeMap() } } -static int __cdecl genCmpLocalVarLifeBeg(const void* elem1, const void* elem2) +int __cdecl genCmpLocalVarLifeBeg(const void* elem1, const void* elem2) { return (*((VarScopeDsc**)elem1))->vsdLifeBeg - (*((VarScopeDsc**)elem2))->vsdLifeBeg; } -static int __cdecl genCmpLocalVarLifeEnd(const void* elem1, const void* elem2) +int __cdecl genCmpLocalVarLifeEnd(const void* elem1, const void* elem2) { return (*((VarScopeDsc**)elem1))->vsdLifeEnd - (*((VarScopeDsc**)elem2))->vsdLifeEnd; } -- 2.7.4