From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/llcommon/llerror.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/llcommon/llerror.cpp (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From 97a2171ea88fe52060e1dfe3fb09d2c320e1bb10 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 09:05:23 -0700 Subject: MAINT-2740 make use of OsOutputDebugString _DEBUG only to avoid interactions between Win 32-bit SEH and boost coroutine fiber stack handling --- indra/llcommon/llerror.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 9b0141eb76..5c8e6cca29 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -201,10 +201,7 @@ namespace { virtual void recordMessage(LLError::ELevel level, const std::string& message) { - llutf16string utf16str = - wstring_to_utf16str(utf8str_to_wstring(message)); - utf16str += '\n'; - OutputDebugString(utf16str.c_str()); + LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message))); } }; #endif -- cgit v1.2.3 From 2750e86beb8220baa62f978c7ccb391654eb955b Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 12:57:03 -0700 Subject: MAINT-2740 and MAINT-2672 rework after code review for 2740 fix and include 2672 fix needed for doing local integ tests --- indra/llcommon/llerror.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 5c8e6cca29..10b8b3105b 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -201,7 +201,7 @@ namespace { virtual void recordMessage(LLError::ELevel level, const std::string& message) { - LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message))); + LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message)).c_str()); } }; #endif @@ -1398,5 +1398,19 @@ namespace LLError { sIndex = 0 ; } + +#if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) + void LLOutputDebugUTF16(const unsigned short* s) + { + // Be careful not to enable this in non-debug builds as there are bad interactions between the + // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 + // + #if defined(_DEBUG) + OutputDebugString(s); + OutputDebugString(TEXT("\n")); + #endif + } +#endif + } -- cgit v1.2.3 From 0ce3d2e1cc9ae70bc7f6146ce38c5dcc1af4a3c6 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 14:17:34 -0700 Subject: MAINT-2740 convert to std::string based API for OutputDebug wrapper cleanliness after sage counsel (slight refrain) --- indra/llcommon/llerror.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 10b8b3105b..c2daa6902f 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -201,7 +201,7 @@ namespace { virtual void recordMessage(LLError::ELevel level, const std::string& message) { - LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message)).c_str()); + LL_WINDOWS_OUTPUT_DEBUG(message); } }; #endif @@ -1400,13 +1400,15 @@ namespace LLError } #if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) - void LLOutputDebugUTF16(const unsigned short* s) + void LLOutputDebugUTF8(const std::string& s) { // Be careful not to enable this in non-debug builds as there are bad interactions between the // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 // #if defined(_DEBUG) - OutputDebugString(s); + // Need UTF16 for Unicode OutputDebugString + // + OutputDebugString(utf8str_to_utf16str(s).c_str()); OutputDebugString(TEXT("\n")); #endif } -- cgit v1.2.3 From a45860fd662f4b0f6c10bf102ebf6c0aac5127f3 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 17:12:46 -0700 Subject: MAINT-2740 put debug output back with guard of debugger presence per Nat review suggestion --- indra/llcommon/llerror.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index c2daa6902f..37ba097832 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1399,18 +1399,19 @@ namespace LLError sIndex = 0 ; } -#if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) +#if LL_WINDOWS void LLOutputDebugUTF8(const std::string& s) { // Be careful not to enable this in non-debug builds as there are bad interactions between the // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 // - #if defined(_DEBUG) + if (IsDebuggerPresent()) + { // Need UTF16 for Unicode OutputDebugString // OutputDebugString(utf8str_to_utf16str(s).c_str()); OutputDebugString(TEXT("\n")); - #endif + } } #endif -- cgit v1.2.3 From bc6070bd197159dd81750d1e2e8af493864be818 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 5 Jun 2013 07:38:54 -0700 Subject: MAINT-2740 more comment grooming and NULL string guard --- indra/llcommon/llerror.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/llerror.cpp') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 37ba097832..d2af004cde 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1402,15 +1402,20 @@ namespace LLError #if LL_WINDOWS void LLOutputDebugUTF8(const std::string& s) { - // Be careful not to enable this in non-debug builds as there are bad interactions between the - // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 + // Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C + // which works just fine under the windows debugger, but can cause users who + // have enabled SEHOP exception chain validation to crash due to interactions + // between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707 // if (IsDebuggerPresent()) { // Need UTF16 for Unicode OutputDebugString // - OutputDebugString(utf8str_to_utf16str(s).c_str()); - OutputDebugString(TEXT("\n")); + if (s.size()) + { + OutputDebugString(utf8str_to_utf16str(s).c_str()); + OutputDebugString(TEXT("\n")); + } } } #endif -- cgit v1.2.3