[vlc-devel] [PATCH] Win32: do not create too big stacktraces

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 14 23:58:53 CET 2011


We can't analyze them anyway, and they take space and bandwidth.
---
 bin/winvlc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bin/winvlc.c b/bin/winvlc.c
index 1b9f475..c6bc227 100644
--- a/bin/winvlc.c
+++ b/bin/winvlc.c
@@ -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< 10000);
 
         fclose( fd );
         fflush( stderr );
-- 
1.7.2.3




More information about the vlc-devel mailing list