[reportlab-users] re: Unicode pyRXP and malloc problems in pyRXP

Stuart Bishop reportlab-users@reportlab.com
Tue, 18 Feb 2003 07:32:27 +1100


On Monday, February 17, 2003, at 10:52  PM, Robin Becker wrote:

> I'm sorry to be really stupid, but which of the n tests causes the
> malloc failure in pyRXP. I haven't time to redo all the tests.

There are three  I have found in xmltest.zip, but the only
one I reported was that 001.ent. It also works for me, but
Mac OS X was throwing up a malloc warning about a 'double free'.

 >>> r = pyRXP.Parser().parse(open('001.xml').read())
*** malloc[25919]: Deallocation of a pointer not malloced: 0x3c2d10; 
This could be a double free(), or free() called with the middle of an 
allocated block; Try setting environment variable MallocHelp to see 
tools to help debug
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
pyRXP.Error: Error: EOE in comment
  in entity "e" defined at line 2 char 1 of 
file:///Users/zen/src/pyRXP-cvs/test/xmltest/invalid/001.ent
  in unnamed entity at line 3 char 4 of 
file:///Users/zen/src/pyRXP-cvs/test/xmltest/invalid/001.ent
error return=1
EOE in comment
Parse Failed!

> 001.xml certainly works for me in that it errors properly.

So we are still where we were - is this an OS X specific bug? Or just 
something
that is only being reported under OS X.

If you run my patch and added the test suites in, you may want to run 
the following:
	python test_xmltestsuite.py test_pyRXP_XMLTestSuite
This will run a number of tests (which will fail as I havn't added all 
the required
features to pyRXP yet to support them). When I run it with Python2.2, I 
get three
malloc warnings. When I run it with Python 2.3 (cvs), I get three 
malloc warnings and
a segfault.

-- 
Stuart Bishop <zen@shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/