On Sat, 2004-06-19 at 18:04, Florent wrote:
So I'm appealing to anyone who can create an autosave :-)
We already have autosave-on-crash already, actually. The one catch is that for crashes due to failed assertions (like this one), it isn't triggered yet.
(I'm CCing the development mailing list, if anyone's interested in attacking this right now:
At least on Unix, this is relatively easy to fix -- just set up a SIGABRT handler similar to the SIGSEGV handler we have now. The one catch is that the handler will need to disable itself as soon as it is triggered, because the autosave code raises SIGABRT when it is done.
Also we should make sure we've got SIGBUS covered if we don't already.)
-mental
On Sat, Jun 19, 2004 at 11:46:26PM -0400, MenTaLguY wrote:
At least on Unix, this is relatively easy to fix -- just set up a SIGABRT handler similar to the SIGSEGV handler we have now. The one catch is that the handler will need to disable itself as soon as it is triggered, because the autosave code raises SIGABRT when it is done.
Also we should make sure we've got SIGBUS covered if we don't already.)
Is this what you had in mind:
Index: src/inkscape.cpp =================================================================== RCS file: /cvsroot/inkscape/inkscape/src/inkscape.cpp,v retrieving revision 1.46 diff -u -p -u -r1.46 inkscape.cpp --- src/inkscape.cpp 21 Jun 2004 02:45:39 -0000 1.46 +++ src/inkscape.cpp 21 Jun 2004 17:06:16 -0000 @@ -400,6 +400,11 @@ inkscape_segv_handler (int signum) gchar sptstr[256]; GtkWidget *msgbox;
+#ifndef WIN32 + /* drop future SIGABRT */ + signal(SIGABRT, SIG_DFL); +#endif + /* Kill loops */ if (recursion) abort (); recursion = TRUE; @@ -556,8 +561,10 @@ inkscape_application_init (const gchar *
#ifndef WIN32 segv_handler = signal (SIGSEGV, inkscape_segv_handler); - signal (SIGFPE, inkscape_segv_handler); - signal (SIGILL, inkscape_segv_handler); + signal (SIGFPE, inkscape_segv_handler); + signal (SIGILL, inkscape_segv_handler); + signal (SIGBUS, inkscape_segv_handler); + signal (SIGABRT, inkscape_segv_handler); #endif
inkscape->argv0 = g_strdup(argv0);
On Mon, 2004-06-21 at 13:07, Kees Cook wrote:
Is this what you had in mind:
That looks just about right. The comment isn't very descriptive, though. Maybe something more like "permit subsequent SIGABRT to dump core"?
Feel free to commit, in any case.
-mental
On Mon, Jun 21, 2004 at 08:51:12PM -0400, MenTaLguY wrote:
That looks just about right. The comment isn't very descriptive, though. Maybe something more like "permit subsequent SIGABRT to dump core"?
Feel free to commit, in any case.
Okay, updated the comment, and did a commit.
On Sat, Jun 19, 2004 at 11:46:26PM -0400, MenTaLguY wrote:
On Sat, 2004-06-19 at 18:04, Florent wrote:
So I'm appealing to anyone who can create an autosave :-)
We already have autosave-on-crash already, actually. The one catch is that for crashes due to failed assertions (like this one), it isn't triggered yet.
(I'm CCing the development mailing list, if anyone's interested in attacking this right now:
At least on Unix, this is relatively easy to fix -- just set up a SIGABRT handler similar to the SIGSEGV handler we have now. The one catch is that the handler will need to disable itself as soon as it is triggered, because the autosave code raises SIGABRT when it is done.
Also we should make sure we've got SIGBUS covered if we don't already.)
Just out of curiousity - did this happen to get implemented?
Bryce
participants (3)
-
Bryce Harrington
-
Kees Cook
-
MenTaLguY