Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Fix calling convention inconsistency
Browse files Browse the repository at this point in the history
WINAPI and STDAPI are defined as __cdecl but in some cases functions
with these attributes are called using stdcall calling convention.

It leads to crashes during execution of 'clrstack -i' command of
SOS plugin on x86.
  • Loading branch information
Konstantin Baladurin committed Oct 2, 2017
1 parent 8f642e1 commit b01cf77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/debug/shim/debugshim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
// CLRDebuggingImpl implementation (ICLRDebugging)
//*****************************************************************************

typedef HRESULT (__stdcall *OpenVirtualProcessImplFnPtr)(ULONG64 clrInstanceId,
typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcessImplFnPtr)(ULONG64 clrInstanceId,
IUnknown * pDataTarget,
HMODULE hDacDll,
CLR_DEBUGGING_VERSION * pMaxDebuggerSupportedVersion,
REFIID riid,
IUnknown ** ppInstance,
CLR_DEBUGGING_PROCESS_FLAGS * pdwFlags);

typedef HRESULT (__stdcall *OpenVirtualProcess2FnPtr)(ULONG64 clrInstanceId,
typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcess2FnPtr)(ULONG64 clrInstanceId,
IUnknown * pDataTarget,
HMODULE hDacDll,
REFIID riid,
Expand Down
2 changes: 1 addition & 1 deletion src/dlls/mscordbi/mscordbi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//*****************************************************************************
#include "stdafx.h"

extern BOOL STDMETHODCALLTYPE DbgDllMain(HINSTANCE hInstance, DWORD dwReason,
extern BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason,
LPVOID lpReserved);

//*****************************************************************************
Expand Down

0 comments on commit b01cf77

Please sign in to comment.