Summary: | crash resulting in forkbomb | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Dima Ryazanov <dima> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.4-beta3 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dima Ryazanov
2006-04-28 10:02:34 UTC
SVN commit 556051 by aoliveira: don't use debug() in the crash handler at all. Some backtraces point to crashes inside of it, and crashing while handling the crash is no fun at all. BUG: 126397 M +3 -4 crashhandler.cpp [POSSIBLY UNSAFE: popen] --- trunk/extragear/multimedia/amarok/src/amarokcore/crashhandler.cpp #556050:556051 @@ -11,7 +11,6 @@ #include "amarok.h" #include "amarokconfig.h" #include "crashhandler.h" -#include "debug.h" #include <kapplication.h> //invokeMailer() #include <kdeversion.h> @@ -53,7 +52,7 @@ static const uint SIZE = 40960; //40 KiB static char stdoutBuf[ SIZE ]; - debug() << "Running: " << command << endl; + std::cout << "Running: " << command << std::endl; FILE *process = ::popen( command, "r" ); stdoutBuf[ std::fread( static_cast<void*>( stdoutBuf ), sizeof(char), SIZE-1, process ) ] = '\0'; @@ -72,7 +71,7 @@ if( pid <= 0 ) { // we are the child process (the result of the fork) - debug() << "Amarok is crashing...\n"; + std::cout << "Amarok is crashing...\n"; QString subject = APP_VERSION " "; QString body = i18n( @@ -177,7 +176,7 @@ subject += QString("[%1]").arg( AmarokConfig::soundSystem().remove( QRegExp("-?engine") ) ); - debug() << subject << endl; + std::cout << subject.latin1() << std::endl; //TODO -fomit-frame-pointer buggers up the backtrace, so detect it SVN commit 566098 by aumuell: _exit if forking failed instead of trying to debug ourselves CCBUG: 126397 M +7 -1 crashhandler.cpp --- trunk/extragear/multimedia/amarok/src/amarokcore/crashhandler.cpp #566097:566098 @@ -71,8 +71,14 @@ // semi-decent bt - I dunno why const pid_t pid = ::fork(); - if( pid <= 0 ) + if( pid < 0 ) { + std::cout << "forking crash reporter failed\n"; + // continuing now can't do no good + _exit( 1 ); + } + else if ( pid == 0 ) + { // we are the child process (the result of the fork) std::cout << "Amarok is crashing...\n"; |