Re: [xml] NAN problems on Win32

On Thu, Jan 24, 2002 at 01:21:11PM -0700, Vakoc, Mark wrote:
The pseudo-code that causes the problem looks something like like:

val = xmlXPathEval(ctxt,_X"COLSET/*"); /* _X is shorthand for BAD_CAST */
int nCols = (int) xmlXPathCastToNumber(val);

It crashes before xmlXPathCastToNumber() returns.  This happens both if val
contains nodes or is an empty node-set.  For this reason I am quite sure
that it is not NAN/INF issue directly.

  I just double checked that code path does hit xmlXPathStringEvalNumber()
which is precisely the function where I had that /* blasphematory term
censored */ problem with the code produced by gcc

I have just sent them a debug build of libxml2, which should disable any
optimization.  I'll keep the list posted as to the results.

  Lemme do a wild bet, the problem will disapear.
Look at the xmlXPathStringEvalNumber() code and the #ifdef __GNUC__
code fragment.
  and the extra disassembly of the gcc generated code:

  Can I ask you to try with that part of the code segment compiled
with the gcc patch activated and optimization turned on as in the
existing shipped code.
I have spent like 12 hours on that fragment of code without understanding
why it failed, and only in a really large DocBook transformation. I'm
starting to suspect something reaaallly nasty underneath. Is your
client using a Celeron too ?


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

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