Skip to content

Commit

Permalink
Block runtime marshaling for calli
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Jan 21, 2024
1 parent ab8839b commit 0327254
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/coreclr/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3672,6 +3672,11 @@ static void CreateNDirectStubWorker(StubState* pss,
COMPlusThrow(kMarshalDirectiveException, IDS_EE_NDIRECT_DISABLEDMARSHAL_PRESERVESIG);
}

if (runtimeMarshallingEnabled && SF_IsCALLIStub(dwStubFlags) && NDirect::MarshalingRequired(pMD))
{
COMPlusThrow(kMarshalDirectiveException, IDS_EE_NDIRECT_UNSUPPORTED_SIG);
}

int numArgs = msig.NumFixedArgs();

// thiscall must have at least one parameter (the "this")
Expand Down

0 comments on commit 0327254

Please sign in to comment.