Skip to content

Commit

Permalink
Check for EnC in profiler rejit (#98546)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason authored and pull[bot] committed Jul 26, 2024
1 parent 434470b commit 83cec4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/coreclr/pal/prebuilt/inc/corerror.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
#define CORDIAGIPC_E_UNKNOWN_ERROR EMAKEHR(0x1387)
#define CORPROF_E_SUSPENSION_IN_PROGRESS EMAKEHR(0x1388)
#define CORPROF_E_NOT_GC_OBJECT EMAKEHR(0x1389)
#define CORPROF_E_MODULE_IS_ENC EMAKEHR(0x138A)
#define CORSEC_E_POLICY_EXCEPTION EMAKEHR(0x1416)
#define CORSEC_E_MIN_GRANT_FAIL EMAKEHR(0x1417)
#define CORSEC_E_NO_EXEC_PERM EMAKEHR(0x1418)
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/vm/rejit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,12 @@ HRESULT ReJitManager::UpdateActiveILVersions(
continue;
}

if (pModule->IsEditAndContinueEnabled())
{
ReportReJITError(pModule, rgMethodDefs[i], NULL, CORPROF_E_MODULE_IS_ENC);
continue;
}

if (!pModule->GetMDImport()->IsValidToken(rgMethodDefs[i]))
{
ReportReJITError(pModule, rgMethodDefs[i], NULL, E_INVALIDARG);
Expand Down

0 comments on commit 83cec4d

Please sign in to comment.