[Python-Dev] any tips on malloc debugging? (original) (raw)

Guido van Rossum guido at python.org
Fri Sep 7 23:16:05 CEST 2007


I think there's a way to enable heavier malloc debugging than the normal --with-pydebug. You'll have to enable it manually by editing Python.h I believe. Though it may already be on if you define Py_DEBUG. (Is WITH_PYMALLOC always on?) Ther may also be a libmalloc that enables heavier debugging; the malloc man page would have info.

On 9/7/07, Bill Janssen <janssen at parc.com> wrote:

I've been expanding the SSL test suite, and found something like this cropping up, not always, but maybe 30% of the time. So I run it under gdb, but the "szoneerror" breakpoint never gets hit. Any other malloc debugging tips I should know about?

(gdb) info break Num Type Disp Enb Address What 1 breakpoint keep y 0x900f2e56 <szoneerror+6> (gdb) (gdb) run ./Lib/test/regrtest.py -R :4: -u all testssl Starting program: /local/python/trunk/src/python.exe ./Lib/test/regrtest.py -R :4: -u all testssl testssl [...] python.exe(22696,0xa000d000) malloc: *** error for object 0x650800: double free python.exe(22696,0xa000d000) malloc: *** set a breakpoint in szoneerror to debug test testssl failed -- Traceback (most recent call last): File "/local/python/trunk/src/Lib/test/testssl.py", line 304, in testSSL3 CERTFILE2, CERTFILE3) File "/local/python/trunk/src/Lib/test/testssl.py", line 203, in serverParamsTest raise testsupport.TestFailed("Unexpected SSL error: " + str(x)) TestFailed: Unexpected SSL error: (8, 'ssl.c:394: EOF occurred in violation of protocol') 1 test failed: testssl [23436 refs] Program exited with code 01. (gdb) Bill


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list