Crashes when making XMLSchema from a WSDL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Critical
|
scoder |
Bug Description
I had been running fine under Python 2.7.6 (OS X 10.9.5)
Today I decided to upgrade my Python to 2.7.9
```
Python : sys.version_
lxml.etree : (3, 4, 1, 0)
libxml used : (2, 9, 0)
libxml compiled : (2, 9, 0)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
```
Now I am getting random "Segmentation fault: 11" error on this code:
```
from lxml import etree
with open('/
schema_tree = etree.parse(f)
schema_el = schema_tree.find(
"{http://
"{http://
)
schema = etree.XMLSchema
```
you can repeat my case by downloading ebaySvc.wsdl file from here:
http://
If I run repeatedly by %cpaste into ipython console... more often than not I get the segfault but sometimes it works.
The times when it works, when I `exit` the ipython console I then see this output:
```
python2.
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
```
I was not having this problem before upgrade to Python 2.7.9
However a similar code which does not segfault is below:
```
from lxml import etree
with open('/
schema = etree.XMLSchema
```
the test file can be downloaded from here:
http://
Apologies, I have now installed Python 2.7.6 under pyenv and tested again... I get the same segfault, so must have been just luck I never noticed the problem before upgrading my Python. I have edited the bug title to reflect this.
``` info(major= 2, minor=7, micro=6, releaselevel= 'final' , serial=0)
Python : sys.version_
lxml.etree : (3, 4, 1, 0)
libxml used : (2, 9, 0)
libxml compiled : (2, 9, 0)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
```
``` Users/anentropi c/Desktop/ ebaySvc. wsdl') as f: schemas. xmlsoap. org/wsdl/}types/{http:// www.w3. org/2001/ XMLSchema}schema") (schema_ el)
$ python
Python 2.7.6 (default, Jan 29 2015, 13:20:57)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
>>> with open('/
... schema_tree = etree.parse(f)
...
>>> schema_el = schema_tree.find("{http://
>>> schema = etree.XMLSchema
Segmentation fault: 11
$
```