Brian Granger wrote: Hi Brian,
>> Yes, at least to see if it can spot the problem. >> >> To get started: Build your own python. Make sure to compile it with >> "--without-pymalloc" and also set the compile flags to "-O0 -g". Build >> valgrind 3.3.0 [or install it from binary packages] and run your code >> under it. If it segfaults valgrind [it happens to me somewhat regularly, >> but then usually something evil is happening in libSingular ;] go and >> check out the 3.4svn version. > > Thanks, I will try this out. I have never used valgrind, so this is > very helpful. Ok, to run it do valgrind --tool=memcheck --trace-children=yes --leak-resolution=high --log-file=foo ./path/to/python Then do your thing, quit python. At that point there should be foo.$PID in the cwd. For a C++ specific example where we did dumb things at dealloc time from Sage look at http://trac.sagemath.org/sage_trac/ticket/1573 Also: searching for delete[] in Sage's trac will turn up a number of other examples. If you get stuck feel free to post the example here and once I take a look at the code I may be able to help you out. >> Let me know if you have any trouble. > > Thanks > > Brian > In the end I would assume people won't mind if some easy cases would get added to the Cython wiki in form of a tutorial, i.e. if you do FOO it blows up but BAR fixes it. I have meant to do this for a long, long time in the Sage wiki, but never got around to it. But it should probably be in the Cython wiki for obvious reasons. Thought? Cheers, Michael _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
