After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593421 - xmlSaveTree yields unexpected results when dumping meta tags
xmlSaveTree yields unexpected results when dumping meta tags
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.7.3
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-28 18:49 UTC by Aaron Patterson
Modified: 2009-08-28 22:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Weird meta tag output reproduction file (1.10 KB, text/plain)
2009-08-28 18:49 UTC, Aaron Patterson
Details
valgrind output (57.87 KB, text/plain)
2009-08-28 20:28 UTC, Aaron Patterson
Details

Description Aaron Patterson 2009-08-28 18:49:51 UTC
Created attachment 141953 [details]
Weird meta tag output reproduction file

When dumping a meta tag from a parsed HTML document with the xmlSaveToIO
function, the output is unexpected.

The output looks like this:

< ="" content=""></>

When it should be like this:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Here is a sample C file to reproduce the problem (I've attached the same file
as well):

http://gist.github.com/177141
Comment 1 Daniel Veillard 2009-08-28 20:09:41 UTC
copied as tst.c in the libxml2 source dir, make tst, then

paphio:~/XML -> ./tst 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


paphio:~/XML -> valgrind ./tst
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


paphio:~/XML -> 

 works for me ! Can't reproduce this, so I will need more input
or you need to make more checks on how this got compiled,

Daniel
Comment 2 Aaron Patterson 2009-08-28 20:24:35 UTC
Sure, what info can I provide?

I'm linking and compiling against libxml2 2.7.3.

uname info:

[apatterson@higgins libxml2-2.7.3]$ uname -a
Darwin higgins.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

GCC Info:

[apatterson@higgins libxml2-2.7.3]$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)
[apatterson@higgins libxml2-2.7.3]$
Comment 3 Aaron Patterson 2009-08-28 20:27:28 UTC
Also, when I run with valgrind, it works.  But when I run without valgrind, I get the strange output.


I will attach my valgrind output
Comment 4 Aaron Patterson 2009-08-28 20:28:43 UTC
Created attachment 141960 [details]
valgrind output
Comment 5 Aaron Patterson 2009-08-28 22:33:20 UTC
This seems to work in head on git.  I will now attempt to close the ticket!