[patch] make test_regression SIGSEGV safe

Leo Savernik l.savernik at aon.at
Mon Feb 9 20:20:40 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I had crashes when running test_regression (which look like a configuration 
problem on my side, not in khtml code), and I couldn't figure out the source 
of them.

Therefore, I made test_regression catch SIGSEGV, SIGABRT, SIGILL, and SIGFPE, 
skip the testcase that caused it (printing an appropriate error msg), and 
continue with the next one.

The rationale behind this is that test_regression should *always* attempt to 
finish all tests, whatever may happen within a dedicated testcase.

The implementation relies on set/longjmp hackery (but one cannot throw 
exceptions within a signal handler and catch them outside of it), and will 
leak memory, but it's still better than keeping test_regression from handling 
all testcases in case of crashes (The leaks should pose minor problems, as 
crashes should only occur very infrequently).

What do you think of it?

mfg
	Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAJ+uYj5jssenUYTsRAmK/AJ9DABgKNIOgoiguyr0n7nGQCXgJ8gCeMAHk
q1QvkjDoK2mlLYjJTfU9QfI=
=rc7T
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: khtml_testregression_1.diff
Type: text/x-diff
Size: 3498 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040209/64af3163/attachment.diff>


More information about the kfm-devel mailing list