diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-08-24 05:04:52 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-08-24 05:04:52 (GMT) |
commit | 18aa388ca084e1d40aa48c8c8f1b4f730c6fe059 (patch) | |
tree | 5701b8dbd43b407aa8dfa621e518bb7df75f6a6b /Lib/decimal.py | |
parent | 21d2ab7fe8a96244ea6cd2838e64ca8439089895 (diff) | |
download | cpython-18aa388ca084e1d40aa48c8c8f1b4f730c6fe059.zip cpython-18aa388ca084e1d40aa48c8c8f1b4f730c6fe059.tar.gz cpython-18aa388ca084e1d40aa48c8c8f1b4f730c6fe059.tar.bz2 |
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.
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r-- | Lib/decimal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py index a545cf8..795b40f 100644 --- a/Lib/decimal.py +++ b/Lib/decimal.py @@ -5061,7 +5061,7 @@ def _dlog10(c, e, p): log_tenpower = f*M # exact else: log_d = 0 # error < 2.31 - log_tenpower = div_nearest(f, 10**-p) # error < 0.5 + log_tenpower = _div_nearest(f, 10**-p) # error < 0.5 return _div_nearest(log_tenpower+log_d, 100) |