From: Egor Chesakov Date: Fri, 24 Jul 2020 22:48:32 +0000 (-0700) Subject: Fix issues with JitStressRange (#39754) X-Git-Tag: submit/tizen/20210909.063632~6433 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8782d4ba80564f170286b1700e53028ccfb7355f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix issues with JitStressRange (#39754) * Add 10 when digit is [a-fA-F] in ConfigMethodRange::InitRanges in utils.cpp * Zero out compMethodHashPrivate earlier in Compiler::compInit() in compiler.cpp --- diff --git a/src/coreclr/src/jit/compiler.cpp b/src/coreclr/src/jit/compiler.cpp index c78ee44..cb129b3 100644 --- a/src/coreclr/src/jit/compiler.cpp +++ b/src/coreclr/src/jit/compiler.cpp @@ -1764,6 +1764,10 @@ void Compiler::compInit(ArenaAllocator* pAlloc, info.compPerfScore = 0.0; #endif // defined(DEBUG) || defined(LATE_DISASM) +#if defined(DEBUG) || defined(INLINE_DATA) + info.compMethodHashPrivate = 0; +#endif // defined(DEBUG) || defined(INLINE_DATA) + #ifdef DEBUG // Opt-in to jit stress based on method hash ranges. // @@ -5287,10 +5291,6 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, verbose = compIsForInlining() ? impInlineInfo->InlinerCompiler->verbose : false; #endif -#if defined(DEBUG) || defined(INLINE_DATA) - info.compMethodHashPrivate = 0; -#endif // defined(DEBUG) || defined(INLINE_DATA) - #if FUNC_INFO_LOGGING LPCWSTR tmpJitFuncInfoFilename = JitConfig.JitFuncInfoFile(); diff --git a/src/coreclr/src/jit/utils.cpp b/src/coreclr/src/jit/utils.cpp index 4477ceb..36e901a 100644 --- a/src/coreclr/src/jit/utils.cpp +++ b/src/coreclr/src/jit/utils.cpp @@ -767,11 +767,11 @@ void ConfigMethodRange::InitRanges(const WCHAR* rangeStr, unsigned capacity) } else if ((L'A' <= *p) && (*p <= L'F')) { - n = (*p++) - L'A'; + n = (*p++) - L'A' + 10; } else if ((L'a' <= *p) && (*p <= L'f')) { - n = (*p++) - L'a'; + n = (*p++) - L'a' + 10; } int j = 16 * i + n;