[Python-Dev] any tips on malloc debugging?

Bill Janssen janssen at parc.com
Fri Sep 7 22:55:57 CEST 2007


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 "szone_error" 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 <szone_error+6>
(gdb) (gdb) run ./Lib/test/regrtest.py -R :4: -u all test_ssl
Starting program: /local/python/trunk/src/python.exe ./Lib/test/regrtest.py -R :4: -u all test_ssl
test_ssl
[...]
python.exe(22696,0xa000d000) malloc: *** error for object 0x650800: double free
python.exe(22696,0xa000d000) malloc: *** set a breakpoint in szone_error to debug
test test_ssl failed -- Traceback (most recent call last):
  File "/local/python/trunk/src/Lib/test/test_ssl.py", line 304, in testSSL3
    CERTFILE2, CERTFILE3)
  File "/local/python/trunk/src/Lib/test/test_ssl.py", line 203, in serverParamsTest
    raise test_support.TestFailed("Unexpected SSL error:  " + str(x))
TestFailed: Unexpected SSL error:  (8, '_ssl.c:394: EOF occurred in violation of protocol')

1 test failed:
    test_ssl
[23436 refs]

Program exited with code 01.
(gdb) 

Bill


More information about the Python-Dev mailing list