Disable the use of compiler TLS by default under Windows.
While compiler TLS support is simpler to use and much faster than using our own Win32 API-based TLS implementation, it results in difficult to debug crashes when used inside a dynamically loaded DLL under Windows XP, so disable it by default to be safe. Closes #13116. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -268,14 +268,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -268,14 +268,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -115,6 +115,27 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Unfortunately we can't use compiler TLS support if the library can be used
|
||||
* inside a dynamically loaded DLL under Windows XP, as this can result in hard
|
||||
* to diagnose crashes due to the bugs in Windows TLS support, see #13116.
|
||||
*
|
||||
* So we disable it unless we can be certain that the code will never run under
|
||||
* XP, as is the case if we're using a compiler which doesn't support XP such
|
||||
* as MSVC 11+, unless it's used with the special "_xp" toolset, in which case
|
||||
* _USING_V110_SDK71_ is defined.
|
||||
*
|
||||
* However defining wxUSE_COMPILER_TLS as 2 overrides this safety check, see
|
||||
* the comments in wx/setup.h.
|
||||
*/
|
||||
#if wxUSE_COMPILER_TLS == 1
|
||||
#if !wxCHECK_VISUALC_VERSION(11) || defined(_USING_V110_SDK71_)
|
||||
#undef wxUSE_COMPILER_TLS
|
||||
#define wxUSE_COMPILER_TLS 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* disable the settings which don't work for some compilers
|
||||
*/
|
||||
|
@@ -268,14 +268,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -268,14 +268,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -268,14 +268,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -269,14 +269,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1106,11 +1113,7 @@
|
||||
// Default is 1.
|
||||
//
|
||||
// Recommended setting: 1 (but can be safely disabled if you don't use it)
|
||||
#ifdef __WXOSX_IPHONE__
|
||||
#define wxUSE_PREFERENCES_EDITOR 0
|
||||
#else
|
||||
#define wxUSE_PREFERENCES_EDITOR 1
|
||||
#endif
|
||||
|
||||
// wxRichToolTip is a customizable tooltip class which has more functionality
|
||||
// than the stock (but native, unlike this class) wxToolTip.
|
||||
|
@@ -264,14 +264,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -267,14 +267,21 @@
|
||||
|
||||
// Enable the use of compiler-specific thread local storage keyword, if any.
|
||||
// This is used for wxTLS_XXX() macros implementation and normally should use
|
||||
// the compiler-provided support as it's simpler and more efficient, but must
|
||||
// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using
|
||||
// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS
|
||||
// support that results in crashes when any TLS variables are used. So if you
|
||||
// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set
|
||||
// this to 0.
|
||||
// the compiler-provided support as it's simpler and more efficient, but is
|
||||
// disabled under Windows in wx/msw/chkconf.h as it can't be used if wxWidgets
|
||||
// is used in a dynamically loaded Win32 DLL (i.e. using LoadLibrary()) under
|
||||
// XP as this triggers a bug in compiler TLS support that results in crashes
|
||||
// when any TLS variables are used.
|
||||
//
|
||||
// Default is 1, but set to 0 if the scenario above is applicable.
|
||||
// If you're absolutely sure that your build of wxWidgets is never going to be
|
||||
// used in such situation, either because it's not going to be linked from any
|
||||
// kind of plugin or because you only target Vista or later systems, you can
|
||||
// set this to 2 to force the use of compiler TLS even under MSW.
|
||||
//
|
||||
// Default is 1 meaning that compiler TLS is used only if it's 100% safe.
|
||||
//
|
||||
// Recommended setting: 2 if you want to have maximal performance and don't
|
||||
// care about the scenario described above.
|
||||
#define wxUSE_COMPILER_TLS 1
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user