Re: [xml] wrong startElement called

On Tue, Nov 09, 2004 at 04:17:13PM -0600, Robert G. Ristroph wrote:
    On the computer where the program crashes, the stack trace shows it enters
the functions startElement which is in legacy.c at line 1397.  On the computer
that works, it calls a startElement that is in my own code, a wrapper around

    What might be causing the code to call one startElement() on one machine and
a different one on the other ?  I have been struggling with this for some time,
and I have already checked the versions and file sizes of all the .so libraries
the program uses.

        Perhaps a bug in the dynamic linker?  Or maybe a difference in the order
that libraries are loaded.  Depending on whether your code or the libxml code
is loaded first, the value stored in the PLT for the actual pointer to the
startElement function can be different.  I'm not quite sure what the behavior
is supposed to be when you have two identically named global symbols (as
you seem to have)

    There is a "static xmlSAXHandler sax" which is defined in my code which
holds a pointer to my startElement.

        How is your startElement function defined?  Is it static also?
The easiest way I can think of to fix your problem is just rename your
function.  Doesn't your linker spit out a warning when you link you

The other solution, which should only be used if the libxml startElement
function should be allowed to be overridden, is to make it a weak symbol
alias in the library.


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