-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
Milestone
Description
When running in the DAC, ReJitManager::IsReJITEnabled
checks the configuration environment variable in the environment of the debugger process, not in the target process:
runtime/src/coreclr/vm/rejit.inl
Lines 24 to 32 in aac3b2c
inline BOOL ReJitManager::IsReJITEnabled() | |
{ | |
LIMITED_METHOD_CONTRACT; | |
static bool profilerStartupRejit = CORProfilerEnableRejit() != FALSE; | |
static ConfigDWORD rejitOnAttachEnabled; | |
return profilerStartupRejit || (rejitOnAttachEnabled.val(CLRConfig::EXTERNAL_ProfAPI_RejitOnAttach) != 0); | |
} |
The CLRConfig::GetConfigString
(called by ConfigDWORD::val
) checks the environment of the current process (the one in which the DAC is loaded), not the target runtime.
Whenever this is fixed please remember to fix the cDAC implementation as well as the DAC.