projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
612c9ef
)
Ensure the function pointer being returned is from an active method. (#35750)
author
Aaron Robinson
<arobins@microsoft.com>
Sun, 3 May 2020 00:39:18 +0000
(17:39 -0700)
committer
GitHub
<noreply@github.com>
Sun, 3 May 2020 00:39:18 +0000
(17:39 -0700)
src/coreclr/src/vm/runtimehandles.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/src/vm/runtimehandles.cpp
b/src/coreclr/src/vm/runtimehandles.cpp
index
2b4cad2
..
2a80972
100644
(file)
--- a/
src/coreclr/src/vm/runtimehandles.cpp
+++ b/
src/coreclr/src/vm/runtimehandles.cpp
@@
-1752,10
+1752,13
@@
void * QCALLTYPE RuntimeMethodHandle::GetFunctionPointer(MethodDesc * pMethod)
{
QCALL_CONTRACT;
- void* funcPtr =
0
;
+ void* funcPtr =
NULL
;
BEGIN_QCALL;
+ // Ensure the method is active so
+ // the function pointer can be used.
+ pMethod->EnsureActive();
funcPtr = (void*)pMethod->GetMultiCallableAddrOfCode();
END_QCALL;