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

Jean-Baptiste Kempf git at videolan.org
Tue Feb 15 10:24:06 CET 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Feb 14 23:51:23 2011 +0100| [f5b88cbb5bb716ef38b1754bd6f7be9f2b151c98] | committer: Jean-Baptiste Kempf

Win32: do not create too big stacktraces

We can't analyze them anyway, and they take space and bandwidth.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5b88cbb5bb716ef38b1754bd6f7be9f2b151c98
---

 bin/winvlc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bin/winvlc.c b/bin/winvlc.c
index 1b9f475..09e739c 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< 100);
 
         fclose( fd );
         fflush( stderr );



More information about the vlc-commits mailing list