]> git.sesse.net Git - vlc/commitdiff
Win32: do not create too big stacktraces
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 14 Feb 2011 22:51:23 +0000 (23:51 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Feb 2011 09:24:03 +0000 (10:24 +0100)
We can't analyze them anyway, and they take space and bandwidth.

bin/winvlc.c

index 1b9f47552096c703cd69cfdd8084c7d8ed923fe9..09e739c17028f93730f02ccfdb7d24578c32901d 100644 (file)
@@ -317,6 +317,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
         DWORD pEbp = pContext->Ebp;
         DWORD caller = *((DWORD*)pEbp + 1);
 
+        unsigned i_line = 0;
         do
         {
             VirtualQuery( (DWORD *)caller, &mbi, sizeof( mbi ) ) ;
@@ -325,8 +326,9 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
             fwprintf( fd, L"%08x|%s\n", caller, module );
             pEbp = *(DWORD*)pEbp ;
             caller = *((DWORD*)pEbp + 1) ;
+            i_line++;
             /*The last EBP points to NULL!*/
-        }while(caller);
+        }while(caller && i_line< 100);
 
         fclose( fd );
         fflush( stderr );