[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/drkonqi
From:       George Kiagiadakis <kiagiadakis.george () gmail ! com>
Date:       2010-08-21 16:53:16
Message-ID: 20100821165316.895E6AC884 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1166376 by gkiagia:

Add exit() and ~(Q|KCleanup)GlobalStatic() to the recognized stack base functions
in an attempt to correctly rate crashes that happen after main() has returned.

Background: To avoid good rating on useless backtraces where 2-3 good functions
with debug symbols appear at the top and then there is only _start() (i.e. no main at \
all, so no debug symbols for the actual executable), the current algorithm tends to \
rate badly backtraces that have no stack base (which can be main, kdemain, \
start_thread, etc...). However, this treats wrong the case where main has returned \
and a destructor of a static object is being called. This commit attempts to fix this \
for the most usual cases.

BUG: 200993

 M  +7 -0      parser/backtraceparser.cpp  
 M  +2 -0      tests/backtraceparsertest/backtraceparsertest_data/data.ini  
 A             tests/backtraceparsertest/backtraceparsertest_data/test_bug200993  


--- trunk/KDE/kdebase/runtime/drkonqi/parser/backtraceparser.cpp #1166375:1166376
@@ -159,6 +159,13 @@
     if ( regExp.exactMatch(line.functionName()) )
         return true;
 
+    //attempt to recognize crashes that happen after main has returned (bug 200993)
+    if ( line.functionName() == "~KCleanUpGlobalStatic" ||
+         line.functionName() == "~QGlobalStatic" ||
+         line.functionName() == "exit" ||
+         line.functionName() == "*__GI_exit" )
+        return true;
+
     return false;
 }
 
--- trunk/KDE/kdebase/runtime/drkonqi/tests/backtraceparsertest/backtraceparsertest_data/data.ini \
#1166375:1166376 @@ -11,6 +11,7 @@
 test_bug192412_a=Useless
 test_bug192412_b=Useless
 test_bug168000=MayBeUseful
+test_bug200993=ReallyUseful
 
 [firstValidFunctions]
 test_usefulfunctions=SqlQueryMaker::handleTracks|SqlQueryMaker::handleResult|SqlWorkerThread::run
 @@ -35,6 +36,7 @@
 test_bug192412_a=gdb
 test_bug192412_b=gdb
 test_bug168000=gdb
+test_bug200993=gdb
 test_usefulfunctions=gdb
 test_usefulfunctions2=gdb
 test_usefulfunctions3=gdb


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic