Re: [gdome] setAttribute segv
- From: Tobias Peters <t-peters gmx de>
- To: <gdome gnome org>
- Subject: Re: [gdome] setAttribute segv
- Date: Tue, 11 Sep 2001 22:24:50 +0200 (CEST)
On Mon, 10 Sep 2001, celic wrote:
> Maybe a better question is why would my elements vtab->setAttribute be
> NULL?
They shouldn't be. This seems to be the same problem as reported on this
list on 27 August by darkman_spam (people seem to have unusual names
lately):
> 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' ;-)
I thought this was a Windows-related problem, but now you are facing the
same.
First, how did you manage to compile this second example? I added the -I
switch as needed, but the compiler complains:
In file included from u.c:4:
/home/t-peters/devel/gdome2-0.6.9/libgdome/gdomecore/gdome-xml-node.h:108:
uninitialized const `gdome_xml_n_vtab'
/home/t-peters/devel/gdome2-0.6.9/libgdome/gdomecore/gdome-xml-node.h:202:
redefinition of `const struct GdomeNodeVtab gdome_xml_n_vtab'
/home/t-peters/devel/gdome2-0.6.9/libgdome/gdomecore/gdome-xml-node.h:108:
`const struct GdomeNodeVtab gdome_xml_n_vtab' previously declared here
/home/t-peters/devel/gdome2-0.6.9/libgdome/gdomecore/gdome-xml-node.h:202:
uninitialized const `gdome_xml_n_vtab'
In file included from u.c:5:
/home/t-peters/devel/gdome2-0.6.9/libgdome/gdomecore/gdome-xml-element.h:127:
uninitialized const `gdome_xml_el_vtab'
And, looking at the source, I can't help but think the compiler is
correct.
These declarations should have been marked as extern. Maybe your compiler
is more permissive and instanciates an uninitialized struct at these
points? These would then contain NULL values instead of function pointers.
I'm using gcc 2.95.4. But I wonder how I could compile the library in the
first place.
If that sounds reasonable to you, could you please try to change all vtab
declarations in the gdomecore header files to be extern, recompile the
library, and report here if it worked for you?
Bye, Tobias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]