Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 48847:b1682c693b9a legacy-trunk
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.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 24 Aug 2008 05:04:52 +0000 |
| parents | 7ad6e4cd7713 |
| children | 6cac2e3077a3 |
line wrap: on
line diff
--- a/Python/pythonrun.c Sat Aug 23 21:40:15 2008 +0000 +++ b/Python/pythonrun.c Sun Aug 24 05:04:52 2008 +0000 @@ -132,8 +132,8 @@ PyThreadState *tstate; PyObject *bimod, *sysmod; char *p; - char *icodeset; /* On Windows, input codeset may theoretically - differ from output codeset. */ + char *icodeset = NULL; /* On Windows, input codeset may theoretically + differ from output codeset. */ char *codeset = NULL; char *errors = NULL; int free_codeset = 0;
