Fix recursive assert in utilcode/debug.cpp when VM code, etc. hits an assert.
authorMike McLaughlin <mikem@microsoft.com>
Wed, 22 Jul 2015 21:01:57 +0000 (14:01 -0700)
committerMike McLaughlin <mikem@microsoft.com>
Wed, 22 Jul 2015 21:01:57 +0000 (14:01 -0700)
The fix was to rearrange the code so the assert isn't necessary and removed it. Fixes TFS bug 1199569.

[tfs-changeset: 1504713]

src/utilcode/debug.cpp

index d5be6cb..33d09fa 100644 (file)
@@ -801,11 +801,10 @@ VOID DbgAssertDialog(const char *szFile, int iLine, const char *szExpr)
         EX_TRY
         {
             FAULT_NOT_FATAL();
+            szExprToDisplay = &g_szExprWithStack2[0];
             strcpy(szExprToDisplay, szExpr);
-            _ASSERTE(szExprToDisplay == g_szExprWithStack2);
             strcat_s(szExprToDisplay, _countof(g_szExprWithStack2), "\n\n");
             GetStringFromStackLevels(1, 10, szExprToDisplay + strlen(szExprToDisplay));
-            szExprToDisplay = &g_szExprWithStack2[0];
             fGotStackTrace = TRUE;               
         }
         EX_CATCH