[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Stefan. Applied in r77589 (trunk), r77590 (py3k), r77591 (release31-maint) with one small change: I moved the freelist and p5s declarations inside the #ifndef Py_USING_MEMORY_DEBUGGER conditionals. The leak itself was fixed in revisions r77578 throu

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-17 Thread Stefan Krah
Stefan Krah added the comment: With the latest dtoa.c, your non-caching pow5mult and a quick hack for Balloc and Bfree I get zero (dtoa.c related) Valgrind errors. So the attached memory_debugger.diff is pretty much all what's needed for Valgrind. -- Added file: http://bugs.python.or

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-17 Thread Mark Dickinson
Mark Dickinson added the comment: Stefan, I'm not particularly familiar with Valgrind: can you tell me what would need to be done? Is a non-caching version of pow5mult all that's required? Here's the patch that I'm using to detect leaks at the moment. (It includes a slow pow5mult version.

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-17 Thread Stefan Krah
Stefan Krah added the comment: Mark, thanks for the explanation! - You can generate suppressions for the Misc/valgrind-python.supp file, but you have to know exactly which errors can be ignored. Going through the Valgrind output again, it looks like most of it is about what you already menti

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: Upgrading to release blocker again: the memory leak should be fixed for 2.7 (and more immediately, for 3.1.2). -- priority: normal -> release blocker ___ Python tracker _

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: Stefan, thanks for that! I'm not entirely sure how to make use of it, though. Is there a way to tell Valgrind that some leaks are expected? The main problem with leak detection is that dtoa.c deliberately keeps hold of any malloc'ed chunks less than a certa

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Stefan Krah
Stefan Krah added the comment: This is what Valgrind complains about: ==4750== 3,456 (1,440 direct, 2,016 indirect) bytes in 30 blocks are definitely lost in loss record 3,302 of 3,430 ==4750==at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==4750==by 0x41B7B5: PyMem_Malloc (object.c:17

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: Okay, so there's a memory leak for overflowing values: if an overflow is detected in the main correction loop of _Py_dg_strtod, then 'references' to bd0, bd, bb, bs and delta aren't released. There may be other leaks; I'm trying to come up with a good way t

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: One of the buildbots just produced a MemoryError from test_strtod: http://www.python.org/dev/buildbot/all/builders/i386%20Ubuntu%203.x/builds/411 It looks as though there's a memory leak somewhere in dtoa.c. It's a bit difficult to tell, though, since the me

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: Fixes merged to py3k and release31-maint in r77535 and r77537. -- priority: release blocker -> normal ___ Python tracker ___ ___

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: I've applied a minimal fix for bugs 5 and 7 in r77530 (trunk). (I wasn't able to produce any strings that trigger bug 7, so it may not technically be a bug.) I'm continuing to review, comment, and clean up the remainder of the _Py_dg_strtod. -- ___

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-16 Thread Mark Dickinson
Mark Dickinson added the comment: Applied the bug 8 patch in r77519 (thanks Eric for reviewing!). For safety, I'll leave this as a release blocker until fixes have been merged to py3k and release31-maint. I've uploaded a fix for bugs 5 and 7 to Rietveld: http://codereview.appspot.com/186182

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith
Eric Smith added the comment: I have a few minor comments posted on Rietveld, but nothing that would keep you from checking this in. -- ___ Python tracker ___ __

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith
Eric Smith added the comment: It looks correct to me, assuming this comment is correct: /* scan back until we hit a nonzero digit. significant digit 'i' is s0[i] if i < nd0, s0[i+1] if i >= nd0. */ I didn't verify the comment itself. -- _

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: issue7632_bug8.patch uploaded to Rietveld: http://codereview.appspot.com/186168 -- ___ Python tracker ___ _

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch for the release blocker. Eric, would you be interested in double checking the logic for this patch? Tim: No, I have to admit I didn't forsee quite this number of bugs. :) -- title: dtoa.c: oversize b in quorem -> dtoa.c: oversize b i