summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abrt.spec2
-rw-r--r--configure.ac2
-rw-r--r--inc/abrtlib.h3
-rw-r--r--lib/Plugins/Bugzilla.cpp6
-rw-r--r--src/Hooks/abrt-hook-ccpp.cpp25
5 files changed, 26 insertions, 12 deletions
diff --git a/abrt.spec b/abrt.spec
index 2ee70348..5e9f636b 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -3,7 +3,7 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Summary: Automatic bug detection and reporting tool
Name: abrt
-Version: 1.0.6
+Version: 1.0.7
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
diff --git a/configure.ac b/configure.ac
index 5088d867..425c5ac5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([abrt], [1.0.6], [crash-catcher@fedorahosted.org])
+AC_INIT([abrt], [1.0.7], [crash-catcher@fedorahosted.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
diff --git a/inc/abrtlib.h b/inc/abrtlib.h
index 443c3725..97aa28b8 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -52,6 +52,9 @@ int vdprintf(int d, const char *format, va_list ap);
#define NORETURN __attribute__ ((noreturn))
+#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
+
+
/* Logging */
enum {
LOGMODE_NONE = 0,
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index b809e34c..9e889c4b 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -315,8 +315,14 @@ uint32_t ctx::new_bug(const map_crash_data_t& pCrashData)
const std::string& release = get_crash_data_item_content(pCrashData, FILENAME_RELEASE);
const std::string& arch = get_crash_data_item_content(pCrashData, FILENAME_ARCHITECTURE);
const std::string& uuid = get_crash_data_item_content(pCrashData, CD_DUPHASH);
+ const char *reason = get_crash_data_item_content_or_NULL(pCrashData, FILENAME_REASON);
std::string summary = "[abrt] crash in " + package;
+ if (reason != NULL)
+ {
+ summary += ": ";
+ summary += reason;
+ }
std::string status_whiteboard = "abrt_hash:" + uuid;
std::string description = "abrt "VERSION" detected a crash.\n\n";
diff --git a/src/Hooks/abrt-hook-ccpp.cpp b/src/Hooks/abrt-hook-ccpp.cpp
index d3f6b25d..54a4c7a5 100644
--- a/src/Hooks/abrt-hook-ccpp.cpp
+++ b/src/Hooks/abrt-hook-ccpp.cpp
@@ -88,17 +88,23 @@ int main(int argc, char** argv)
{
error_msg_and_die("pid '%s' or limit '%s' is bogus", argv[2], argv[5]);
}
- if (signal_no != SIGQUIT
- && signal_no != SIGILL
- && signal_no != SIGABRT
- && signal_no != SIGFPE
- && signal_no != SIGSEGV
- ) {
- /* not an error, exit silently */
+
+ const char *signame = NULL;
+ /* Tried to use array for this but C++ does not support v[] = { [IDX] = "str" } */
+ switch (signal_no)
+ {
+ case SIGQUIT: signame = "QUIT"; break;
+ case SIGILL : signame = "ILL" ; break;
+ case SIGABRT: signame = "ABRT"; break;
+ case SIGFPE : signame = "FPE" ; break;
+ case SIGSEGV: signame = "SEGV"; break;
+ }
+ if (signame == NULL)
+ {
+ /* not a signal we care about, exit silently */
return 0;
}
-
char *user_pwd = get_cwd(pid); /* may be NULL on error */
int core_fd = STDIN_FILENO;
@@ -192,8 +198,7 @@ int main(int argc, char** argv)
}
char* cmdline = get_cmdline(pid); /* never NULL */
- const char *signame = strsignal(signal_no);
- char *reason = xasprintf("Process was terminated by signal %s (%s)", signal_str, signame ? signame : signal_str);
+ char *reason = xasprintf("Process %s was killed by signal %s (SIG%s)", executable, signal_str, signame ? signame : signal_str);
unsigned path_len = snprintf(path, sizeof(path), "%s/ccpp-%ld-%lu.new",
dddir, (long)time(NULL), (long)pid);