[gdome]"make check" fail.



  Hello,

  I'm trying to compile gdome-0.6.9. Config and compile times are ok.
The tests compile time also. But when 'make check' is running the test
programs, they cause segmentation fault (SIGTRAP).

  I'm watching one of these tests, test/test-document, with the help of

gdb, and I surprisely found that gdome_xml_el_vtab, the vtab for 
elements in gdome_xml_vtabs, is equal to { 0, 0, 0, ... }.

  When gdome_xml_n_mkref() [gdome-xml-node.c] constructs the node, it 
refers to that virtual table (gdome_xml_el_vtab). Then when 
test_document1() try to call self->vtab->tagName, which is '0', there 
is a seg fault.

  It would seems that, in the other test programs which crash (each 
one, except test-loadsave and test-str), the seg fault is also caused 
by dereferencing of a pointer of a vtab, constructed by 
gdome_xml_n_mkref().

  I don't understand why the elements of this virtual table are all the

same as NULL. And also why there aren't test like 'self -> vtab -> 
tagName == NULL' ;-)

  For infos, I use cygwin-1.3.2-1 and gcc-2.95.3-5 and the version of 
gdome I try to install is the latest, gdome2-0.6.9.


  The line which causes seg fault :

    gdome.c - GdomeElement interface API :
    GdomeDOMString * gdome_el_tagName ( GdomeElement * self,
      GdomeException * exc ) :
    7726 : self -> vtab -> tagName ( self, exc )

  And the line which assigns gdome_xml_el_vtab to self -> vtab :

    gdome-xml-node.c - Constructor and Reference Count Implementation :
    GdomeNode * gdome_xml_n_mkref ( xmlNode * n ) :
    182 : result -> super.vtab = ( GdomeNodeVtab * ) gdome_xml_vtabs
      [ n -> type ]

where 'n -> type == 1' and 'gdome_xml_vtabs [1] == &gdome_xml_el_vtab'.

  See gdome-xml-element.c:43 for gdome_xml_el_vtab and 
gdome-xml-node.c:68 for gdome_xml_vtabs.


  Thanks in advance for some enlightenment.

--drkm


___________________________________________________________
Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr !
Yahoo! Courrier : http://fr.mail.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]