diff options
author | Jim Ma <mazong1123@gmail.com> | 2017-04-07 23:33:21 +0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-04-07 08:33:21 -0700 |
commit | a86df0d0abe3ca5a7eed1db673c4ea48cfc3c61c (patch) | |
tree | 91db4f1db9caad44cf81ee673ff3781c8647b831 /src/vm/method.cpp | |
parent | 6f0bd8d2b7d956cda9c0d80315ca9a853d2a4680 (diff) | |
download | coreclr-a86df0d0abe3ca5a7eed1db673c4ea48cfc3c61c.tar.gz coreclr-a86df0d0abe3ca5a7eed1db673c4ea48cfc3c61c.tar.bz2 coreclr-a86df0d0abe3ca5a7eed1db673c4ea48cfc3c61c.zip |
Handle unsupported varargs tests on Unix gracefully. (#10794)
Some of mcc_i* tests caused segmentation faults on Unix. This commit make these tests exit by throwing a System.EntryPointNotFoundException exception instead of causing a segmentation fault.
Fix #9530
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r-- | src/vm/method.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp index 834ab63d58..a72b07b404 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -5042,12 +5042,14 @@ LPVOID NDirectMethodDesc::FindEntryPoint(HINSTANCE hMod) const FARPROC pFunc = NULL, pFuncW = NULL; +#ifndef FEATURE_PAL // Handle ordinals. if (GetEntrypointName()[0] == '#') { long ordinal = atol(GetEntrypointName()+1); return reinterpret_cast<LPVOID>(GetProcAddress(hMod, (LPCSTR)(size_t)((UINT16)ordinal))); } +#endif // Just look for the unmangled name. If it is unicode fcn, we are going // to need to check for the 'W' API because it takes precedence over the |