Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
disable reference clearing for _ParserSchemaValidationContext class #266
I catchted a segfault using lxml 4.2.1:
It occurs when calling the disconnect() method whose attributes don't exist anymore.
My modification prevent the clearing of those attributes (I believe).
According to the following comment in parser.pxi :
It seems that the memory clearing of this object is already taken into account, so there won't be a memory leak.
FYI : this is my first pull request, please tell me if I did something wrong ;-) also I don't know much about Cython & LXML project , so my modification may be wrong
added a commit
this pull request
Jun 3, 2018
Thanks for the patch. I took another deep look myself, and I think the decorator needs to go to the parser context class instead. Could you please check that my fix works for you? Just install Cython and build lxml from a source checkout (or master branch download).