Bug 178592 - Libxml++ segfaults because of latest libsigc++ ?
Libxml++ segfaults because of latest libsigc++ ?
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: libxml++ (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Konstantin Ryabitsev
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-22 01:21 EST by Fabrice Colin
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.12.0-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-13 14:13:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fabrice Colin 2006-01-22 01:21:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
I am experiencing segfaults in a program of mine that uses libxml++. To find
out where the problem lies, I tried the examples that come with
libxml++-devel and they segault too.

It looks like there's a conflict with libstdc++ (libstdc++-4.0.2-8.fc4).
What makes me say that is :
- that problem appeared after I updated my (then up-to-date) system at
the end of november and installed the afore-mentioned version of libstdc++.
- the backtrace points to gnu_cxx symbols
- the problem goes away if I rebuild libxml++ using the SRPM

If I compile "/usr/share/doc/libxml++-devel-2.12.0/examples/dom_parser/main.cc"
and run the executable against any XML file, say "/etc/gaim/prefs.xml", I'll
get this output :

Node name = pref
Node name = pref
     line = 3
  Attribute version = 1.0
  Attribute name = /
Segmentation fault

gdb shows this backtrace :

(gdb) bt
#0  0x00270483 in __gnu_cxx::__pool<true>::_M_reclaim_block () from /usr/lib/libstdc++.so.6
#1  0x0804a469 in __gnu_cxx::__mt_alloc<std::_List_node<xmlpp::Attribute*>, __gnu_cxx::__common_pool_policy<__gnu_cxx::__pool, true> >::deallocate ()
#2  0x0804a485 in std::_List_base<xmlpp::Attribute*, std::allocator<xmlpp::Attribute*> >::_M_put_node ()
#3  0x0804a4ee in std::_List_base<xmlpp::Attribute*, std::allocator<xmlpp::Attribute*> >::_M_clear ()
#4  0x0804a512 in std::_List_base<xmlpp::Attribute*, std::allocator<xmlpp::Attribute*> >::~_List_base$base ()
#5  0x0804a56a in std::list<xmlpp::Attribute*, std::allocator<xmlpp::Attribute*> >::~list ()
#6  0x08049c6e in print_node ()
#7  0x08049ece in main ()

Commenting out parser.set_validate(), line 124, to disable DTD validation
will help testing with any XML file.

This happens every time for me with FC4/i386. I saw it happen on ppc too, but
cannot confirm right now whether the problem still exists on that platform.

Could it be some kind of ABI compatibility issues ? I saw somebody reported
a similar issue (with Debian) on the libxmlplusplus-general mailing list :
http://sourceforge.net/mailarchive/forum.php?thread_id=8989783&forum_id=12784

I hope this helps.

Fabrice

Version-Release number of selected component (if applicable):
libxml++-2.12.0-1.fc4

How reproducible:
Always

Steps to Reproduce:
1. $ cp /usr/share/doc/libxml++-devel-2.12.0/examples/dom_parser/main.cc xmltest.cc
2. Comment out "parser.set_validate();", line 124
3. $ g++ -c xmltest.cc -o xmltest.o `pkg-config --cflags libxml++-2.6`
4. $ libtool --mode=link g++ -fPIC -o xmltest xmltest.o `pkg-config --libs libxml++-2.6`
5. Run against any XML file, for instance $ ./xmltest /etc/gaim/prefs.xml
6. See segfault
7. Get the libxml++ SRPM, rebuild and install RPMs
8. Recompile and relink xmltest, run 5. again : the program will then work correctly

Actual Results:  Step 5 : xmltest fails with this output :

Node name = pref
Node name = pref
     line = 3
  Attribute version = 1.0
  Attribute name = /
Segmentation fault


Expected Results:  xmltest should print a dump of the XML document, as follows :

Node name = pref
Node name = pref
     line = 3
  Attribute version = 1.0
  Attribute name = /


  Node name = pref
Node name = pref
       line = 4
    Attribute name = core
...


Additional info:
Comment 1 Konstantin Ryabitsev 2006-01-26 10:13:02 EST
Sorry for the delay. I can confirm the segfaults, so I will fire off a rebuild
shortly.

Note You need to log in before you can comment on or make changes to this bug.