Re: Segfault in in PyString_FromStringAndSize
"Fernando M. Maresca" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 06, 2009 at 10:06:04AM -0500, James Henstridge wrote: > Hi Fernando, > > For these sort of bugs, I'd recommend using valgrind to track down the problem. > > First you'll need a test program that triggers the bug, but it sounds > like you've got that already. > > Unfortunately, to get best results you'll probably need to compile > your own Python interpreter with the --disable-pymalloc flag to > configure. This is needed because valgrind doesn't know how to track > allocations made by Python's special purpose memory allocator. > Disabling that allocator causes Python to do standard malloc/free > calls, giving useful results. > > [I've got a patch for Python that would do this automatically at > runtime, but it hasn't been reviewed or merged yet]. > > You can then try something like: > > valgrind --tool=memcheck --log-file=valgrind.log --leak-check=full > --num-callers=20 /path/to/my/python test-script.py > > That should produce some interesting information. Hi James, thanks for the advice. I'll try it ASAP, then repost. Chau, Fernando _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkmxPUYACgkQCtDmpVXdEMZwHwCfYL8WtRhcwQ0evr0JfyTwHVSX +30Aniji0e4yiWaODmWDeZswpc3oU970 =66ww -----END PGP SIGNATURE-----