Skip to content

Commit

Permalink
Fix AV in crossgen when generating PDBs (dotnet#16184)
Browse files Browse the repository at this point in the history
I missed updating one of the callers of `ReadyToRunInfo::GetEntryPoint`
in dotnet#15801. Fix by making the last arg explicit so this kind of type
confusion error is less likely, and updating the missed call site.

Closes #16177.
  • Loading branch information
AndyAyersMS authored Feb 3, 2018
1 parent ba10b49 commit 4e617da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ PCODE MethodDesc::GetPrecompiledR2RCode(PrepareCodeConfig* pConfig)
Module * pModule = GetModule();
if (pModule->IsReadyToRun())
{
pCode = pModule->GetReadyToRunInfo()->GetEntryPoint(this, pConfig);
pCode = pModule->GetReadyToRunInfo()->GetEntryPoint(this, pConfig, TRUE /* fFixups */);
}
#endif
return pCode;
Expand Down
4 changes: 2 additions & 2 deletions src/vm/readytoruninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static bool SigMatchesMethodDesc(MethodDesc* pMD, SigPointer &sig, Module * pMod
return true;
}

PCODE ReadyToRunInfo::GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig, BOOL fFixups /*=TRUE*/)
PCODE ReadyToRunInfo::GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig, BOOL fFixups)
{
STANDARD_VM_CONTRACT;

Expand Down Expand Up @@ -864,7 +864,7 @@ PCODE ReadyToRunInfo::MethodIterator::GetMethodStartAddress()
{
STANDARD_VM_CONTRACT;

PCODE ret = m_pInfo->GetEntryPoint(GetMethodDesc(), FALSE);
PCODE ret = m_pInfo->GetEntryPoint(GetMethodDesc(), NULL, FALSE);
_ASSERTE(ret != NULL);
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion src/vm/readytoruninfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ReadyToRunInfo

static PTR_ReadyToRunInfo Initialize(Module * pModule, AllocMemTracker *pamTracker);

PCODE GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig, BOOL fFixups = TRUE);
PCODE GetEntryPoint(MethodDesc * pMD, PrepareCodeConfig* pConfig, BOOL fFixups);

MethodDesc * GetMethodDescForEntryPoint(PCODE entryPoint);

Expand Down

0 comments on commit 4e617da

Please sign in to comment.