Well not very sure about it actually. the thing is that it will parse my doc correctly 1000 times, then segfault. one thing that strikes me now, is that when I use it with no signalling in my script, it parses 100 000 times without a glitch. could be that signalling stuff that makes it segfault, i'm gonna try...
Another thought about it : if it segfaults, then I can trap this signal. if I do, will my script go back to normal or die cause its buggy ? I'm gonna try...