How can I catch segmentation fault in python?

Wolfgang Rohdewald wolfgang at rohdewald.de
Wed Nov 17 10:47:16 EST 2010


On Mittwoch 17 November 2010, Wolfgang Rohdewald wrote:
> On Mittwoch 17 November 2010, justin wrote:
> > But the problem is that the code is not mine, and it takes
> > over a day for me to get the point where the segmentation
> > fault occurred. Plus, it seems that the point is not
> > deterministic
> > 
> > Still, I think I should at least try to figure out exactly
> > at which point the segmentation fault occurs, and think
> > where to go from there according to your kind advice.
> 
> try valgrind

hit the send button too fast...

even if the segmentation fault only happens after a long time
valgrind might find problems much sooner, and fixing them
might remove the segmentation fault.

-- 
Wolfgang



More information about the Python-list mailing list