From c1dc03e6bb9479c3feb66be2eda4e38e7ef42cf4 Mon Sep 17 00:00:00 2001 From: ftillier Date: Tue, 27 Sep 2005 00:42:13 +0000 Subject: [PATCH] [WSD] Fix startup issues in free builds where _DllMain was getting inlined, causing the stack overflow detection to incorrectly fire. Signed-off-by: Fab Tillier (ftillier@silverstorm.com) git-svn-id: svn://openib.tc.cornell.edu/gen1@94 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/ulp/wsd/user/ibspdll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/ulp/wsd/user/ibspdll.c b/trunk/ulp/wsd/user/ibspdll.c index 62096471..d0fd7a52 100644 --- a/trunk/ulp/wsd/user/ibspdll.c +++ b/trunk/ulp/wsd/user/ibspdll.c @@ -55,6 +55,7 @@ uint32_t g_max_inline = 0xFFFFFFFF; * Description: * Provides initialization when the ibspdll DLL is loaded. */ +#pragma auto_inline( off ) static BOOL _DllMain( IN HINSTANCE hinstDll, @@ -93,7 +94,7 @@ _DllMain( IBSP_TRACE( IBSP_DBG_DLL, ("DllMain: DLL_PROCESS_ATTACH\n") ); #ifdef _DEBUG_ - i = GetEnvironmentVariable( "IBWSD_DBG", env_var, 16 ); + i = GetEnvironmentVariable( "IBWSD_DBG", env_var, sizeof(env_var) ); if( i && i <= 16 ) { gdbg_lvl = _tcstoul( env_var, NULL, 16 ); @@ -106,7 +107,7 @@ _DllMain( /* See if the user wants to disable RDMA reads. */ no_read = GetEnvironmentVariable( "IBWSD_NO_READ", NULL, 0 ); - i = GetEnvironmentVariable( "IBWSD_INLINE", env_var, 16 ); + i = GetEnvironmentVariable( "IBWSD_INLINE", env_var, sizeof(env_var) ); if( i && i <= 16 ) g_max_inline = _tcstoul( env_var, NULL, 10 ); @@ -183,6 +184,7 @@ _DllMain( return TRUE; } +#pragma auto_inline( off ) extern BOOL APIENTRY -- 2.41.0