On Mon, Apr 24, 2017 at 11:58 AM, Bob Kline <bkline@rksystems.com> wrote:
Well, it turns out that the problematic xmlError structs aren't coming from libxml2 at all, but are instead being assembled fresh in the lxml code. I've found a couple of places where this is happening, and I'm hopeful that fixing them so they're not leaving garbage at the end of the structs (or at least not for the node member) will eliminate the core dumps.
Bingo! https://github.com/lxml/lxml/pull/244 I fixed two places that were creating xmlError structs with garbage in the node member. I wasn't absolutely certain that the node in the incoming c_error was safe, so I erred on the side of caution and just set the node member to NULL in _forwardXPathError() (in extensions.pxi). Didn't look like there was anything to work with for a non-NULL node member of the struct created in _receiveXSLTError() (in xmlerror.pxi), so that got a NULL as well. Let me know if I've done anything questionable. Thanks, Bob