From 18aa388ca084e1d40aa48c8c8f1b4f730c6fe059 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 24 Aug 2008 05:04:52 +0000 Subject: Fix: * crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5. --- Modules/signalmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Modules/signalmodule.c') diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index e297240120..628780fe5e 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -784,7 +784,8 @@ initsignal(void) #if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER) ItimerError = PyErr_NewException("signal.ItimerError", PyExc_IOError, NULL); - PyDict_SetItemString(d, "ItimerError", ItimerError); + if (ItimerError != NULL) + PyDict_SetItemString(d, "ItimerError", ItimerError); #endif if (!PyErr_Occurred()) -- cgit v1.2.1