<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel">
    <title>gmane.comp.lang.ruby.modules.libxml.devel</title>
    <link>http://blog.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1566"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1565"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1564"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1563"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1562"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1561"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1560"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1559"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1558"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1557"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1556"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1555"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1554"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1553"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1552"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1551"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1550"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1549"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1548"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1547"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1566">
    <title>Version 2.1.0 Released</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1566</link>
    <description>&lt;pre&gt;Version 2.1.0 of the libxml bindings has been released.  The changelog is:

* Ruby 1.9.3 compatability (Charlie Savage).

* Added XPath expression &amp;lt;-&amp;gt; Ruby value conversion methods (Jens Wille).

* Extracted rxml_xpath_to_value from rxml_xpath_context_find (Jens Wille).

* Adapted rxml_xpath_from_value from Gregoire Lejeune's ruby-xslt
   library, see https://github.com/glejeune/ruby-xslt (Jens Wille).

* Allow calling #find on nodes returned from Reader (Charlie Savage).

* Change document handling in XPath::Context to address segmentation 
fault on
   Ruby Enterprise Edition (Charlie Savage).

* Update gemspec file to work directly with bundler thereby allowing git
   repository to be used as gem (Charlie Savage).

* Support gem buld (Charlie Savage).

* Simplify memory management of attributes namespaces to fix
   segmentation faults that occurred when using Ruby 1.9.3 (Charlie Savage).

Thanks,

Charlie
&lt;/pre&gt;</description>
    <dc:creator>Charlie Savage</dc:creator>
    <dc:date>2011-08-01T04:12:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1565">
    <title>Version 2.0.7 Released</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1565</link>
    <description>&lt;pre&gt;Version 2.0.7 has been released.  It includes two changes:

* Fix compile issue on Ruby 1.9.3
* Add in 2 new HTML Parser constants - NODEFDTD and NOIMPLIED.

Thanks,

Charlie
&lt;/pre&gt;</description>
    <dc:creator>Charlie Savage</dc:creator>
    <dc:date>2011-06-25T06:30:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1564">
    <title>Version 2.0.6 Available</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1564</link>
    <description>&lt;pre&gt;I just pushed up version 2.0.6.  This release includes one change:

* Fix segfault that sometimes occurred when looking up encodings on 1.9.
   In some cases the Ruby encoding infrastructure was not properly
   initialized (nkriege).

Thanks,

Charlie
&lt;/pre&gt;</description>
    <dc:creator>Charlie Savage</dc:creator>
    <dc:date>2011-05-24T02:11:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1563">
    <title>Version 2.0.4 Released</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1563</link>
    <description>&lt;pre&gt;I just pushed up the 2.0.4 release of libxml-ruby.  This release 
includes a fix that allows the libxml-ruby bindings to once again be 
compiled against older versions of libxml2 (specifically earlier that 
1.1.25).

Thanks,

Charlie
&lt;/pre&gt;</description>
    <dc:creator>Charlie Savage</dc:creator>
    <dc:date>2011-05-03T00:23:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1562">
    <title>[ libxml-Bugs-29140 ] segfaults randomly</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1562</link>
    <description>&lt;pre&gt;Bugs item #29140, was opened at 2011-04-21 07:46
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=29140&amp;amp;group_id=494

Category: memory
Group: None
Status: Open
Resolution: Accepted
Priority: 3
Submitted By: James Pharaoh (jamespharaoh)
Assigned to: Charlie Savage (cfis)
Summary: segfaults randomly

Initial Comment:
I am getting segfaults pretty regularly in my ruby 1.9.1 webrick application. They are always in a block which is accessing libxml nodes. Here's an example, I can add more as I get them, or provide any other help solving this. I don't really know where to start.

/home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:30:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1561">
    <title>Version 2.0.3 Released</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1561</link>
    <description>&lt;pre&gt;I just pushed up the next release of libxml-ruby.  It includes one big 
fix and lots of little fixes that cleanup most of the old issues on 
RubyForge and GitHub.

The big fix is supporting the use of libxml-ruby in native background 
Ruby threads.  Previously, the use of libxml-ruby in background threads 
in Ruby 1.9.x and higher would often cause segmentation faults.

And for the little fixes, please see below.

Thanks,

Charlie

------------

* The biggest change in this release is supporting the use of 
libxml-ruby in native background Ruby threads.  Previously, the use of 
libxml-ruby in background threads in Ruby 1.9.x and higher would often 
cause segmentation faults.  This has now been fixed (Charlie Savage).

* Update Reader#expand so that returned node correctly remembers its
   encoding in Ruby 1.9.x (zerebubuth).

* Add check to verify a node has not been deleted.  This can happen when
   a ruby variable holds a reference to a child node that gets freed
   when its parent gets freed.  Previously when this happened a
   segmentation fault would occur, now an exception is raised (Charlie 
Savage, fixes
   RubyForge #26839.

* Do not unlink nodes before internal validations have run - avoids
   segmentation faults caused by freeing a node twice (Charlie Savage).

* Add support for Document#canonicalization (Victor Lin).

* Fix memory leak in Reader#lookup_namespace (Charlie Savage).

* Fix memory leak in Reader#[] (Nathan Kriege).

* Fix usage of &amp;lt; at &amp;gt;io instance variable (Jeffrey Taylor)

* Removed old sax error handling code that has been fixed in newer
   versions of libxml (Charlie Savage).

* Code cleanup - remove unused variables and commented out code (Charlie 
Savage)

* Minor text changes and documentation fixes (Charlie Savage).

* Fix documentation error (fixes RubyForge #26888).

* Update documentation for Document#validation* methods (fixes RubyForge 
#24833).

* Update documentation and test (fixes Ruby Forge Issue #28770).

* Updated documentation in README (Anurag Priyam):
1. rake doc does not work; use rake rdoc.
2. gem mislav-hanna does not exist; use hanna.
3. rake rdoc 'depends' on hanna; no need of RDOCOPTS
4. Point to the github issue tracker instead of Ruby Forge
5. Point to the github (gh-pages) site for docs

* Add tc_error to test suite (Charlie Savage).

* Add sax test (Stanislav O.Pogrebnyak).
&lt;/pre&gt;</description>
    <dc:creator>Charlie Savage</dc:creator>
    <dc:date>2011-05-02T06:54:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1560">
    <title>[ libxml-Bugs-29140 ] segfaults randomly</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1560</link>
    <description>&lt;pre&gt;Bugs item #29140, was opened at 2011-04-21 07:46
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=29140&amp;amp;group_id=494

Category: memory
Group: None
Resolution: Accepted
Priority: 3
Submitted By: James Pharaoh (jamespharaoh)
Assigned to: Charlie Savage (cfis)
Summary: segfaults randomly

Initial Comment:
I am getting segfaults pretty regularly in my ruby 1.9.1 webrick application. They are always in a block which is accessing libxml nodes. Here's an example, I can add more as I get them, or provide any other help solving this. I don't really know where to start.

/home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:31:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1559">
    <title>[ libxml-Bugs-28101 ] Segmentation Fault whenrunning on Snow Leopard (Mac OS 10.6.3)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1559</link>
    <description>&lt;pre&gt;Bugs item #28101, was opened at 2010-04-16 10:22
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=28101&amp;amp;group_id=494

Category: memory
Group: None
Resolution: Accepted
Priority: 3
Submitted By: Matt Young (fireknite)
Assigned to: Charlie Savage (cfis)
Summary: Segmentation Fault when running on Snow Leopard (Mac OS 10.6.3)

Initial Comment:
I've been getting this error:
------------------------------------------------------
[BUG] Segmentation fault
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]

Abort trap
------------------------------------------------------

When trying to run code since Apple released an update for Snow Leopard 10.6.2 --&amp;gt; 10.6.3.

Code worked perfectly fine in 10.6.2 on both snow leopard and snow leopard server, but breaks at 10.6.3.


----------------------------------------------------------------------

Date: 2011-05-02 00:30

Message:
Hi Matt,

I am going to close this issue since I believe it is fixed.  Please reopen on Github if needed.  See https://github.com/xml4r/libxml-ruby

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-22 21:45

Message:
Hi Matt,

Hopefully this has been fixed by the latest release.  If you have a chance can you check?

Thanks - Charlie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=28101&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:30:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1558">
    <title>[ libxml-Bugs-27977 ] libxml-ruby-1.1.3 failing test</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1558</link>
    <description>&lt;pre&gt;Bugs item #27977, was opened at 2010-03-16 16:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27977&amp;amp;group_id=494

Category: General
Group: None
Resolution: Accepted
Priority: 3
Submitted By: Matthew Kent (mattkent)
Assigned to: Charlie Savage (cfis)
Summary: libxml-ruby-1.1.3 failing test

Initial Comment:
Packaging libxml-ruby for CentOS 5.4 and I'm getting one failing test

  1) Failure:
test_mode(TestReader) [./test/tc_reader.rb:178]:
&amp;lt;3&amp;gt; expected but was
&amp;lt;5&amp;gt;.

289 tests, 1284 assertions, 1 failures, 0 errors

looks like it's still in XML::Reader::MODE_READING mode

This is with

libxml2-2.6.26-2.1.2.8
libxml2-devel-2.6.26-2.1.2.8

----------------------------------------------------------------------

Date: 2011-05-02 00:29

Message:
Hi Matthew,

I am going to close this issue since I haven't heard back.  Please reopen on Github if needed.  See https://github.com/xml4r/libxml-ruby

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-22 22:40

Message:
Could you try the latest version?

Thanks - Chalrie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27977&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:29:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1557">
    <title>[ libxml-Bugs-26672 ] Segmentation fault</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1557</link>
    <description>&lt;pre&gt;Bugs item #26672, was opened at 2009-07-20 07:06
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=26672&amp;amp;group_id=494

Category: None
Group: None
Resolution: Accepted
Priority: 3
Submitted By: Thomas Preymesser (thopre)
Assigned to: Charlie Savage (cfis)
Summary: Segmentation fault

Initial Comment:
/usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:6: [BUG] Segmentation fault
ruby 1.9.2dev (2009-07-20 trunk 24213) [i686-linux]

&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:28:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1556">
    <title>[ libxml-Bugs-26863 ] Libxml::Node#children causessegfault</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1556</link>
    <description>&lt;pre&gt;Bugs item #26863, was opened at 2009-08-04 22:27
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=26863&amp;amp;group_id=494

Category: None
Group: None
Resolution: Accepted
Priority: 3
Submitted By: Nobody (None)
Assigned to: Charlie Savage (cfis)
Summary: Libxml::Node#children causes segfault

Initial Comment:

The following ruby snippet causes a segmentation fault with ruby 1.8.7 p160 and libxml-ruby 1.1.3. 

###File: libxml_test.rb###
#! /usr/local/bin/ruby

require "rubygems"
require 'xml'
require 'xml/libxml'

def child(e)
  e.children.each do |n| # segfault
    child(n)
  end
end

def make_text(txt)
  return
end

file = File.open("html")
regexp_result = file.read

regexp_rexml_result = XML::Parser.string(regexp_result)
doc = regexp_rexml_result.parse

cnt = 1
loop do
  elem = doc.find("//*")
  elem.each{|e|
    child(e)
  }
  p cnt
  cnt+=1
end

###result###
1
2
3
4
./libxml_test.rb:8: [BUG] Segmentation fault
ruby 1.8.7 (2009-04-08 patchlevel 160) [x86_64-linux]


###trace###
gdb --args ruby ./libxml_test.rb

GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
(gdb) run
Starting program: /usr/local/bin/ruby ./libxml_test.rb
[Thread debugging using libthread_db enabled]
[New Thread 0x2b59906fb1b0 (LWP 25792)]
1
2
3
4

Program received signal SIGSEGV, Segmentation fault.
0x0000000000472959 in st_lookup (table=0x2b599137c7e0, key=10937, value=0x7fffbc525290) at st.c:250
250         hash_val = do_hash(key, table);
(gdb) backtrace
#0  0x0000000000472959 in st_lookup (table=0x2b599137c7e0, key=10937, value=0x7fffbc525290) at st.c:250
#1  0x00000000004115e5 in search_method (klass=47663683986880, id=10937, origin=0x7fffbc5252c8) at eval.c:475
#2  0x0000000000411657 in rb_get_method_body (klassp=0x7fffbc525310, idp=0x7fffbc525318, noexp=0x7fffbc525324) at eval.c:496
#3  0x000000000041c215 in rb_call (klass=47663683986880, recv=47663683986080, mid=10937, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6128
#4  0x0000000000416ebb in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3494
#5  0x0000000000416dc7 in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3488
#6  0x0000000000418fcf in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3224
#7  0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=&amp;lt;value optimized out&amp;gt;, argc=11097, argv=0x7fffbc526048, body=0x2b5990739640, flags=&amp;lt;value optimized out&amp;gt;)
    at eval.c:6057
#8  0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc526040, scope=1, self=47663675716280) at eval.c:6153
#9  0x0000000000416ff3 in rb_eval (self=&amp;lt;value optimized out&amp;gt;, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3509
#10 0x000000000041a2b5 in rb_yield_0 (val=47663683986080, self=47663675716280, klass=0, flags=&amp;lt;value optimized out&amp;gt;, avalue=0) at eval.c:5079
#11 0x0000000000486791 in rb_ary_each (ary=47663675330080) at array.c:1261
#12 0x000000000041b54a in rb_call0 (klass=47663675661400, recv=47663675330080, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b599074d410, flags=&amp;lt;value optimized out&amp;gt;) at eval.c:5906
#13 0x000000000041c258 in rb_call (klass=47663675661400, recv=47663675330080, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153
#14 0x0000000000416ebb in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3494
#15 0x0000000000418fcf in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3224
#16 0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=&amp;lt;value optimized out&amp;gt;, argc=0, argv=0x7fffbc527218, body=0x2b5990739640, flags=&amp;lt;value optimized out&amp;gt;) at eval.c:6057
#17 0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc527210, scope=1, self=47663675716280) at eval.c:6153
#18 0x0000000000416ff3 in rb_eval (self=&amp;lt;value optimized out&amp;gt;, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3509
#19 0x000000000041a2b5 in rb_yield_0 (val=47663683988920, self=47663675716280, klass=0, flags=&amp;lt;value optimized out&amp;gt;, avalue=0) at eval.c:5079
#20 0x0000000000486791 in rb_ary_each (ary=47663675344200) at array.c:1261
#21 0x000000000041b54a in rb_call0 (klass=47663675661400, recv=47663675344200, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b599074d410, flags=&amp;lt;value optimized out&amp;gt;) at eval.c:5906
#22 0x000000000041c258 in rb_call (klass=47663675661400, recv=47663675344200, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153
#23 0x0000000000416ebb in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3494
#24 0x0000000000418fcf in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3224
#25 0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=&amp;lt;value optimized out&amp;gt;, argc=32767, argv=0x7fffbc5283e8, body=0x2b5990739640, flags=&amp;lt;value optimized out&amp;gt;)
    at eval.c:6057
#26 0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc5283e0, scope=1, self=47663675716280) at eval.c:6153
#27 0x0000000000416ff3 in rb_eval (self=&amp;lt;value optimized out&amp;gt;, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3509
#28 0x000000000041a2b5 in rb_yield_0 (val=47663684015880, self=47663675716280, klass=0, flags=&amp;lt;value optimized out&amp;gt;, avalue=0) at eval.c:5079
#29 0x00002b5991381066 in rxml_xpath_object_each (self=47663678310840) at ruby_xml_xpath_object.c:184
#30 0x000000000041b54a in rb_call0 (klass=47663682999600, recv=47663678310840, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b5990e4d440, flags=&amp;lt;value optimized out&amp;gt;) at eval.c:5906
#31 0x000000000041c258 in rb_call (klass=47663682999600, recv=47663678310840, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153
#32 0x0000000000416ebb in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3494
#33 0x0000000000418fcf in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3224
#34 0x000000000041a2b5 in rb_yield_0 (val=6, self=47663675716280, klass=0, flags=&amp;lt;value optimized out&amp;gt;, avalue=0) at eval.c:5079
#35 0x0000000000424e47 in loop_i () at eval.c:5211
#36 0x0000000000410704 in rb_rescue2 (b_proc=0x424e30 &amp;lt;loop_i&amp;gt;, data1=0, r_proc=0, data2=0) at eval.c:5475
#37 0x00000000004108e0 in rb_f_loop () at eval.c:5236
#38 0x000000000041b54a in rb_call0 (klass=47663675726160, recv=47663675716280, id=4121, oid=4121, argc=0, argv=0x0, body=0x2b5990759b98, flags=&amp;lt;value optimized out&amp;gt;) at eval.c:5906
#39 0x000000000041c258 in rb_call (klass=47663675726160, recv=47663675716280, mid=4121, argc=0, argv=0x0, scope=1, self=47663675716280) at eval.c:6153
#40 0x0000000000416ff3 in rb_eval (self=&amp;lt;value optimized out&amp;gt;, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3509
#41 0x0000000000418fcf in rb_eval (self=47663675716280, n=&amp;lt;value optimized out&amp;gt;) at eval.c:3224
#42 0x00000000004279e9 in ruby_exec_internal () at eval.c:1643
#43 0x0000000000427a35 in ruby_exec () at eval.c:1663
#44 0x0000000000427a5f in ruby_run () at eval.c:1673
#45 0x000000000040ddc3 in main (argc=2, argv=0x7fffbc52a328, envp=&amp;lt;value optimized out&amp;gt;) at main.c:48


----------------------------------------------------------------------

Date: 2011-05-02 00:26

Message:
Hi Josh,

I think this is now fixed.  If not, let me know and reopen a ticket here (or better yet on GitHub at https://github.com/xml4r/libxml-ruby).

Charlie

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-22 23:45

Message:
Does the html file have specific content, or just any html file?

If I save this page to the file html, and run the script, all is well with the new release.

Could you retest with the new release?

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Josh Glover (jmglov)
Date: 2011-03-04 07:58

Message:
Ah, but this can't be right:

(gdb) up 5
#5  0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250
250    hash_val = do_hash(key, table);

table is again WAAAAAY out there; no way that's going to be addressable. table comes from eval.c#L486 :

478 static NODE*
479 search_method(klass, id, origin)
480     VALUE klass, *origin;
481     ID id;
482 {
483     st_data_t body;
484 
485     if (!klass) return 0;
486     while (!st_lookup(RCLASS(klass)-&amp;gt;m_tbl, id, &amp;amp;body)) {
487         klass = RCLASS(klass)-&amp;gt;super;
488         if (!klass) return 0;
489     }
490 
491     if (origin) *origin = klass;
492     return (NODE *)body;
493 }

So some class has lost its pointer to its function pointer table. I don't think I have the time to take this much further, but hopefully this info is useful to someone. :-/

----------------------------------------------------------------------

Comment By: Josh Glover (jmglov)
Date: 2011-03-04 07:03

Message:
(gdb) info locals
hash_val = 0
bin_pos = 32122193
ptr = 0x7f2b21f2dd40
(gdb) l
245    st_data_t *value;
246{
247    unsigned int hash_val, bin_pos;
248    register st_table_entry *ptr;
249
250    hash_val = do_hash(key, table);
251    FIND_ENTRY(table, ptr, hash_val, bin_pos);
252
253    if (ptr == 0) {
254return 0;

Oops, ptr hasn't been assigned to yet at L250. I'll keep digging.

BTW, I compiled Ruby like this to get all of the debug symbols:

CFLAGS='-O0 -g -Wall' ./configure --disable-pthread &amp;amp;&amp;amp; make

----------------------------------------------------------------------

Comment By: Josh Glover (jmglov)
Date: 2011-03-04 07:01

Message:
: josh&amp;lt; at &amp;gt;josh; gdb ~/tmp/ruby-1.8.7-p334/ruby core
GNU gdb (GDB) 7.2-ubuntu
[...]
Program terminated with signal 6, Aborted.
#0  0x00007f2b225c5ba5 in raise (sig=&amp;lt;value optimised out&amp;gt;) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007f2b225c5ba5 in raise (sig=&amp;lt;value optimised out&amp;gt;) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f2b225c96b0 in abort () at abort.c:92
#2  0x00000000004c284e in rb_bug (fmt=0x4e1b13 "Segmentation fault") at error.c:213
#3  0x000000000048e1b9 in sigsegv (sig=11) at signal.c:634
#4  &amp;lt;signal handler called&amp;gt;
#5  0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250
#6  0x000000000040e861 in search_method (klass=139823229885920, id=10985, origin=0x7fffc0295528) at eval.c:486
[...]

(gdb) up 5
#5  0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250
250    hash_val = do_hash(key, table);
(gdb) info locals
hash_val = 0
bin_pos = 32122193
ptr = 0x7f2b21f2dd40

0x7f2b21f2dd40 is 139_823_229_885_760 in decimal, so unless my ThinkPad T510i has 139 terrabytes of memory, this is a segmentation fault. :)

----------------------------------------------------------------------

Comment By: Josh Glover (jmglov)
Date: 2011-03-04 06:55

Message:
Breaks in ruby-1.8.7-p334:

: josh&amp;lt; at &amp;gt;josh; ~/tmp/ruby-1.8.7-p334/ruby test/tc_node_child.rb &amp;gt;/dev/null 
test/tc_node_child.rb:21: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
Aborted (core dumped)


----------------------------------------------------------------------

Comment By: Josh Glover (jmglov)
Date: 2011-03-04 06:42

Message:
Interesting data point, it works on ruby 1.8.7_0 but not 1.8.7_299:

: josh&amp;lt; at &amp;gt;josh; /usr/bin/ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
: josh&amp;lt; at &amp;gt;josh; /usr/bin/ruby test/tc_node_child.rb &amp;gt;/dev/null 
test/tc_node_child.rb:21: [BUG] Segmentation fault
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
Aborted (core dumped)

: josh&amp;lt; at &amp;gt;josh; ~/tmp/ruby-1.8.7/ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
: josh&amp;lt; at &amp;gt;josh; ~/tmp/ruby-1.8.7/ruby test/tc_node_child.rb &amp;gt;/dev/null 
# Victory!

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=26863&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:26:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1555">
    <title>[ libxml-Bugs-28662 ] Segfault assigningdocument.root when running in thread</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1555</link>
    <description>&lt;pre&gt;Bugs item #28662, was opened at 2010-10-21 13:21
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=28662&amp;amp;group_id=494

Category: None
Group: None
Resolution: Accepted
Priority: 3
Submitted By: Alan Gano (alangano)
Assigned to: Charlie Savage (cfis)
Summary: Segfault assigning document.root when running in thread

Initial Comment:
Gentoo x86_64; ruby 1.9.2; libxml2 2.7.7; libxml-ruby 1.1.3 (gem)

------------------------------------------------------
#!/opt/ruby/bin/ruby192 -w

require 'libxml'

t1 = Thread.new {
   100000.times { |i|
      document = LibXML::XML::Document.new
      document.root = LibXML::XML::Node.new('test')
   }
}     

t1.join
------------------------------------------------------


Segfault is avoided if:
- .root assignment is removed
- GC.start is called at end of loop
- not run in thread
- the loop is made to run slower (e.g., printing out i variable)


$ ./aa42
./aa42:8: [BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:25:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1554">
    <title>compile libxml-ruby mannualy</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1554</link>
    <description>&lt;pre&gt;Hi,

I am using Rubyinstaller on Windows 7.

I tried installing  libxml-ruby1.1.4 and 2.0.2

1.    using the command gem install libxml-ruby
2.    gem install libxml-ruby --platform=x86-
mingw32

3.   gem install libxml-ruby -v 2.0.2

 and  After that when i give  'bundle install'  , I get this error :

1. Faliling to install libxml-ruby 1.1.4 native extensions

 2.extconfig failure : need zlib

Am I missing something here?

How do you manually compile libxml-ruby for windows?

Rdocs says that  Win32 has all builtin binaries for libxml-ruby and its
dependencies.

Please, I need advice.


Thanks,

Swetha
_______________________________________________
libxml-devel mailing list
libxml-devel&amp;lt; at &amp;gt;rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel&lt;/pre&gt;</description>
    <dc:creator>Swetha Nesari</dc:creator>
    <dc:date>2011-04-26T16:13:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1553">
    <title>[ libxml-Bugs-27432 ] Segfault during garbagecollection</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1553</link>
    <description>&lt;pre&gt;Bugs item #27432, was opened at 2009-11-13 11:08
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27432&amp;amp;group_id=494

Category: memory
Group: v0.5
Resolution: Accepted
Priority: 3
Submitted By: Mat Brown (outoftime)
Assigned to: Charlie Savage (cfis)
Summary: Segfault during garbage collection

Initial Comment:
Tracked down a persistent segfault during big Solr reindexes (using libxml-ruby to build the Solr docs) to libxml-ruby. These operations involve building thousands of XML messages and the segfault generally occurs at an unpredictable time during the operation.

We're linking against libxml2 2.6.32

I hope this is helpful - I'm no C expert - but here is the backtrace from the core dump:

#0  0x00000035c2a30215 in raise () from /lib64/libc.so.6
#1  0x00000035c2a31cc0 in abort () from /lib64/libc.so.6
#2  0x000000000049729c in rb_bug ()
#3  0x000000000047495d in ?? ()
#4  &amp;lt;signal handler called&amp;gt;
#5  0x000000000042f577 in ?? ()
#6  0x000000000042f60f in rb_gc_mark ()
#7  0x00002b8f12be0db9 in rxml_node_mark (xnode=0x195ad980) at ruby_xml_node.c:82
#8  0x00002b8f12bdc463 in rxml_attributes_mark (xnode=0x44)
    at ruby_xml_attributes.c:39
#9  0x000000000042fa73 in ?? ()
#10 0x000000000042f5f2 in ?? ()
#11 0x000000000042f3a9 in ?? ()
#12 0x000000000042f3d6 in rb_gc_mark_locations ()
#13 0x00000000004252a4 in ?? ()
#14 0x000000000042fa73 in ?? ()
#15 0x000000000042f5f2 in ?? ()
#16 0x000000000042f3e9 in ?? ()
#17 0x000000000047764d in st_foreach ()
#18 0x000000000042f40b in ?? ()
#19 0x000000000042fa89 in ?? ()
#20 0x000000000042f5f2 in ?? ()
#21 0x000000000042f3e9 in ?? ()
#22 0x000000000047764d in st_foreach ()
#23 0x000000000042f40b in ?? ()
#24 0x000000000042fa89 in ?? ()
#25 0x000000000042f5f2 in ?? ()
#26 0x000000000042f3e9 in ?? ()
#27 0x000000000047764d in st_foreach ()
#28 0x000000000042f40b in ?? ()
#29 0x000000000042f9be in ?? ()
#30 0x000000000042f5f2 in ?? ()
#31 0x000000000042f97c in ?? ()
#32 0x000000000042f5f2 in ?? ()
#33 0x000000000042f715 in ?? ()
#34 0x000000000042f5f2 in ?? ()
#35 0x000000000042f3e9 in ?? ()
#36 0x000000000047764d in st_foreach ()
#37 0x000000000042f40b in ?? ()
#38 0x000000000042f9ad in ?? ()
#39 0x000000000042f5f2 in ?? ()
#40 0x000000000042f97c in ?? ()
#41 0x000000000042f5f2 in ?? ()
#42 0x000000000042f715 in ?? ()
#43 0x000000000042f5f2 in ?? ()
#44 0x000000000042f3e9 in ?? ()
#45 0x000000000047764d in st_foreach ()
#46 0x000000000042f40b in ?? ()
#47 0x000000000042f9ad in ?? ()
#48 0x000000000042f5f2 in ?? ()
#49 0x000000000042f97c in ?? ()
#50 0x000000000042f5f2 in ?? ()
#51 0x000000000042f715 in ?? ()
#52 0x000000000042f5f2 in ?? ()
#53 0x000000000042f3e9 in ?? ()
#54 0x000000000047764d in st_foreach ()
#55 0x000000000042f40b in ?? ()
#56 0x000000000042f9ad in ?? ()
#57 0x000000000042f5f2 in ?? ()
#58 0x000000000042f3e9 in ?? ()
#59 0x000000000047764d in st_foreach ()
#60 0x000000000042f40b in ?? ()
#61 0x000000000042f9be in ?? ()
#62 0x000000000042f5f2 in ?? ()
#63 0x000000000042f97c in ?? ()
#64 0x000000000042f5f2 in ?? ()
#65 0x000000000042f97c in ?? ()
#66 0x000000000042f5f2 in ?? ()
#67 0x000000000042f97c in ?? ()
#68 0x000000000042f5f2 in ?? ()
#69 0x000000000042f715 in ?? ()
#70 0x000000000042f5f2 in ?? ()
#71 0x000000000042f715 in ?? ()
#72 0x000000000042f5f2 in ?? ()
#73 0x000000000042f715 in ?? ()
#74 0x000000000042f5f2 in ?? ()
#75 0x0000000000430545 in rb_gc_mark_frame ()
#76 0x00000000004305f0 in ?? ()
#77 0x000000000042eb41 in ruby_xmalloc ()
#78 0x0000000000421982 in ?? ()
#79 0x0000000000421a2e in ?? ()
#80 0x0000000000422108 in ?? ()
#81 0x000000000042221b in rb_block_proc ()
#82 0x00000000004174b5 in ?? ()
#83 0x000000000041cd71 in ?? ()
#84 0x000000000041d284 in ?? ()
#85 0x000000000041660b in ?? ()
#86 0x000000000041546d in ?? ()
#87 0x00000000004171af in ?? ()
#88 0x000000000041cd71 in ?? ()
#89 0x000000000041d284 in ?? ()
#90 0x000000000041d47c in ?? ()
#91 0x000000000041c30e in ?? ()
#92 0x000000000041d284 in ?? ()
#93 0x00000000004163bf in ?? ()
#94 0x000000000041cd71 in ?? ()
#95 0x000000000041d284 in ?? ()
#96 0x000000000041660b in ?? ()
#97 0x0000000000419d42 in ?? ()
#98 0x000000000041a111 in rb_yield ()
#99 0x000000000048b3ff in ?? ()
#100 0x000000000041c322 in ?? ()
#101 0x000000000041d284 in ?? ()
#102 0x00000000004163bf in ?? ()
#103 0x000000000041546d in ?? ()
#104 0x000000000041cd71 in ?? ()
#105 0x000000000041d284 in ?? ()
#106 0x000000000041660b in ?? ()
#107 0x00000000004171af in ?? ()
#108 0x0000000000414855 in ?? ()
#109 0x000000000041cd71 in ?? ()
#110 0x000000000041d284 in ?? ()
#111 0x000000000041660b in ?? ()
#112 0x000000000041cd71 in ?? ()
#113 0x000000000041d284 in ?? ()
#114 0x00000000004163bf in ?? ()
#115 0x000000000041cd71 in ?? ()
#116 0x000000000041d284 in ?? ()
#117 0x0000000000416696 in ?? ()
#118 0x0000000000417278 in ?? ()
#119 0x0000000000415937 in ?? ()
#120 0x000000000041cd71 in ?? ()
#121 0x000000000041d284 in ?? ()
#122 0x0000000000416696 in ?? ()
#123 0x0000000000414b55 in ?? ()
#124 0x000000000041cd71 in ?? ()
#125 0x000000000041d284 in ?? ()
#126 0x000000000041d9fd in rb_call_super ()
#127 0x00000000004169d6 in ?? ()
#128 0x000000000041546d in ?? ()
#129 0x000000000041cd71 in ?? ()
#130 0x000000000041d284 in ?? ()
#131 0x000000000041660b in ?? ()
#132 0x0000000000422e74 in ?? ()
#133 0x00000000004151fc in ?? ()
#134 0x0000000000415e39 in ?? ()
#135 0x000000000041cd71 in ?? ()
#136 0x000000000041d284 in ?? ()
#137 0x000000000041d8a9 in rb_funcall2 ()
#138 0x000000000041b921 in ?? ()
#139 0x000000000041d0d8 in ?? ()
#140 0x00000000004163bf in ?? ()
#141 0x000000000041546d in ?? ()
#142 0x0000000000419d42 in ?? ()
#143 0x000000000041eaff in ?? ()
#144 0x000000000041e91f in ?? ()
#145 0x000000000041eb24 in ?? ()
#146 0x000000000041eb93 in ?? ()
#147 0x000000000041ecf4 in rb_obj_instance_eval ()
#148 0x000000000041c30e in ?? ()
#149 0x000000000041d284 in ?? ()
#150 0x00000000004163bf in ?? ()
#151 0x0000000000422e74 in ?? ()
#152 0x00000000004151fc in ?? ()
#153 0x000000000041cd71 in ?? ()
#154 0x000000000041d284 in ?? ()
#155 0x00000000004163bf in ?? ()
#156 0x0000000000422e74 in ?? ()
#157 0x00000000004151fc in ?? ()
#158 0x000000000041cd71 in ?? ()
#159 0x000000000041d284 in ?? ()
#160 0x000000000041660b in ?? ()
#161 0x000000000041546d in ?? ()
#162 0x0000000000419d42 in ?? ()
#163 0x000000000041eaff in ?? ()
#164 0x000000000041e91f in ?? ()
#165 0x000000000041eb24 in ?? ()
#166 0x000000000041eb93 in ?? ()
#167 0x000000000041ecf4 in rb_obj_instance_eval ()
#168 0x000000000041c30e in ?? ()
#169 0x000000000041d284 in ?? ()
#170 0x00000000004163bf in ?? ()
#171 0x0000000000422e74 in ?? ()
#172 0x00000000004151fc in ?? ()
#173 0x000000000041cd71 in ?? ()
#174 0x000000000041d284 in ?? ()
#175 0x000000000041d8a9 in rb_funcall2 ()
#176 0x00000000004206c8 in rb_obj_call_init ()
#177 0x0000000000445d39 in rb_class_new_instance ()
#178 0x000000000041c30e in ?? ()
#179 0x000000000041d284 in ?? ()
#180 0x00000000004163bf in ?? ()
#181 0x0000000000422e74 in ?? ()
#182 0x00000000004151fc in ?? ()
#183 0x0000000000417278 in ?? ()
#184 0x000000000041cd71 in ?? ()
#185 0x000000000041d284 in ?? ()
#186 0x000000000041d8a9 in rb_funcall2 ()
#187 0x00000000004206c8 in rb_obj_call_init ()
#188 0x0000000000445d39 in rb_class_new_instance ()
#189 0x000000000041c30e in ?? ()
#190 0x000000000041d284 in ?? ()
#191 0x00000000004163bf in ?? ()
#192 0x0000000000422e74 in ?? ()
#193 0x00000000004151fc in ?? ()
#194 0x000000000041cd71 in ?? ()
#195 0x000000000041d284 in ?? ()
#196 0x00000000004163bf in ?? ()
#197 0x000000000041546d in ?? ()
#198 0x00000000004161d7 in ?? ()
#199 0x00000000004161d7 in ?? ()
#200 0x000000000041546d in ?? ()
#201 0x0000000000417278 in ?? ()
#202 0x000000000041cd71 in ?? ()
#203 0x000000000041d284 in ?? ()
#204 0x000000000041d47c in ?? ()
#205 0x000000000041c30e in ?? ()
#206 0x000000000041d284 in ?? ()
#207 0x00000000004163bf in ?? ()
#208 0x000000000041cd71 in ?? ()
#209 0x000000000041d284 in ?? ()
#210 0x00000000004163bf in ?? ()
#211 0x00000000004171af in ?? ()
#212 0x00000000004161d7 in ?? ()
#213 0x0000000000414b55 in ?? ()
#214 0x000000000041cd71 in ?? ()
#215 0x000000000041d284 in ?? ()
#216 0x00000000004163bf in ?? ()
#217 0x0000000000419d42 in ?? ()
#218 0x000000000041a111 in rb_yield ()
#219 0x000000000048a902 in rb_ary_each ()
#220 0x000000000041c322 in ?? ()
#221 0x000000000041d284 in ?? ()
#222 0x0000000000415593 in ?? ()
#223 0x000000000041cd71 in ?? ()
#224 0x000000000041d284 in ?? ()
#225 0x000000000041660b in ?? ()
#226 0x0000000000419d42 in ?? ()
#227 0x000000000041a111 in rb_yield ()
#228 0x000000000048b3b7 in ?? ()
#229 0x000000000041c322 in ?? ()
#230 0x000000000041d284 in ?? ()
#231 0x00000000004163bf in ?? ()
#232 0x000000000041546d in ?? ()
#233 0x00000000004171af in ?? ()
#234 0x000000000041cd71 in ?? ()
#235 0x000000000041d284 in ?? ()
#236 0x000000000041660b in ?? ()
#237 0x0000000000419d42 in ?? ()
#238 0x000000000041586a in ?? ()
#239 0x000000000041cd71 in ?? ()
#240 0x000000000041d284 in ?? ()
#241 0x00000000004163bf in ?? ()
#242 0x0000000000422e74 in ?? ()
#243 0x00000000004151fc in ?? ()
#244 0x00000000004161d7 in ?? ()
#245 0x00000000004161d7 in ?? ()
#246 0x00000000004177c4 in ?? ()
#247 0x000000000041781a in ?? ()
#248 0x00000000004171af in ?? ()
#249 0x000000000041cd71 in ?? ()
#250 0x000000000041d284 in ?? ()
#251 0x000000000041660b in ?? ()
#252 0x000000000041546d in ?? ()
#253 0x000000000041cd71 in ?? ()
#254 0x000000000041d284 in ?? ()
#255 0x00000000004163bf in ?? ()
#256 0x000000000041cd71 in ?? ()
#257 0x000000000041d284 in ?? ()
#258 0x000000000041660b in ?? ()
#259 0x000000000041cd71 in ?? ()
#260 0x000000000041d284 in ?? ()
#261 0x00000000004163bf in ?? ()
#262 0x000000000041cd71 in ?? ()
#263 0x000000000041d284 in ?? ()
#264 0x00000000004163bf in ?? ()
#265 0x0000000000419d42 in ?? ()
#266 0x000000000041586a in ?? ()
#267 0x0000000000414fb0 in ?? ()
#268 0x0000000000419d42 in ?? ()
#269 0x000000000041586a in ?? ()
#270 0x0000000000415b4a in ?? ()
#271 0x000000000041cd71 in ?? ()
#272 0x000000000041d284 in ?? ()
#273 0x000000000041660b in ?? ()
#274 0x000000000041546d in ?? ()
#275 0x000000000041cd71 in ?? ()
#276 0x000000000041d284 in ?? ()
#277 0x000000000041660b in ?? ()
#278 0x000000000041546d in ?? ()
#279 0x000000000041cd71 in ?? ()
#280 0x000000000041d284 in ?? ()
#281 0x00000000004163bf in ?? ()
#282 0x0000000000415937 in ?? ()
#283 0x0000000000419d42 in ?? ()
#284 0x000000000041a111 in rb_yield ()
#285 0x000000000048a902 in rb_ary_each ()
#286 0x000000000041c322 in ?? ()
#287 0x000000000041d284 in ?? ()
#288 0x00000000004163bf in ?? ()
#289 0x000000000041546d in ?? ()
#290 0x0000000000419d42 in ?? ()
#291 0x0000000000422642 in ?? ()
#292 0x0000000000422803 in ?? ()
#293 0x000000000041c2ff in ?? ()
#294 0x000000000041d284 in ?? ()
#295 0x00000000004163bf in ?? ()
#296 0x0000000000419d42 in ?? ()
#297 0x000000000041a111 in rb_yield ()
#298 0x000000000048a902 in rb_ary_each ()
#299 0x000000000041c322 in ?? ()
#300 0x000000000041d284 in ?? ()
#301 0x00000000004163bf in ?? ()
#302 0x000000000041546d in ?? ()
#303 0x000000000041cd71 in ?? ()
#304 0x000000000041d284 in ?? ()
#305 0x000000000041660b in ?? ()
#306 0x0000000000419d42 in ?? ()
#307 0x000000000041586a in ?? ()
#308 0x0000000000415b4a in ?? ()
#309 0x000000000041cd71 in ?? ()
#310 0x000000000041d284 in ?? ()
#311 0x00000000004163bf in ?? ()
#312 0x000000000041546d in ?? ()
#313 0x000000000041cd71 in ?? ()
#314 0x000000000041d284 in ?? ()
#315 0x000000000041660b in ?? ()
#316 0x000000000041cd71 in ?? ()
#317 0x000000000041d284 in ?? ()
#318 0x00000000004163bf in ?? ()
#319 0x000000000041cd71 in ?? ()
#320 0x000000000041d284 in ?? ()
#321 0x000000000041660b in ?? ()
#322 0x0000000000419d42 in ?? ()
#323 0x000000000041a111 in rb_yield ()
#324 0x000000000048a902 in rb_ary_each ()
#325 0x000000000041c322 in ?? ()
#326 0x000000000041d284 in ?? ()
#327 0x00000000004163bf in ?? ()
#328 0x000000000041546d in ?? ()
#329 0x0000000000419d42 in ?? ()
#330 0x000000000041586a in ?? ()
#331 0x0000000000415937 in ?? ()
#332 0x000000000041cd71 in ?? ()
#333 0x000000000041d284 in ?? ()
#334 0x000000000041660b in ?? ()
#335 0x000000000041546d in ?? ()
#336 0x000000000041cd71 in ?? ()
#337 0x000000000041d284 in ?? ()
#338 0x0000000000416696 in ?? ()
#339 0x0000000000419d42 in ?? ()
#340 0x000000000041586a in ?? ()
#341 0x0000000000415937 in ?? ()
#342 0x000000000041cd71 in ?? ()
#343 0x000000000041d284 in ?? ()
#344 0x000000000041660b in ?? ()
#345 0x000000000041546d in ?? ()
#346 0x000000000041cd71 in ?? ()
#347 0x000000000041d284 in ?? ()
#348 0x00000000004163bf in ?? ()
#349 0x000000000041188f in ?? ()
#350 0x000000000041f178 in rb_load ()
#351 0x000000000041f4ea in ?? ()
#352 0x000000000041c30e in ?? ()
#353 0x000000000041d284 in ?? ()
#354 0x000000000041660b in ?? ()
#355 0x000000000041188f in ?? ()
#356 0x0000000000411fc3 in ?? ()
#357 0x000000000041200f in ruby_exec ()
#358 0x0000000000412033 in ruby_run ()
#359 0x000000000040fd79 in main ()

----------------------------------------------------------------------

Date: 2011-05-02 00:29

Message:
Hi Mat,

I am going to close this issue since I believe it is fixed.  Please reopen on Github if needed.  See https://github.com/xml4r/libxml-ruby

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-22 21:48

Message:
I realize this is pretty old now - but do you still see this with the latest release?

Charlie

----------------------------------------------------------------------

Comment By: Niel Drummond (cyanescent)
Date: 2010-01-02 17:20

Message:
you need to recompile libxml2 (and libxml-ruby) with debug flags enabled for your backtrace to become useful.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27432&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-05-02T06:29:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1552">
    <title>[ libxml-Bugs-27848 ] Error#code_to_s givesincosistent answer (sometimes wrong)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1552</link>
    <description>&lt;pre&gt;Bugs item #27848, was opened at 2010-02-17 05:52
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27848&amp;amp;group_id=494

Category: General
Group: None
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Jarl Friis (jarl)
Assigned to: Charlie Savage (cfis)
Summary: Error#code_to_s gives incosistent answer (sometimes wrong)

Initial Comment:
Hi.

Version 1.1.3

I experience that LibXML::XML::Error#code_to_s gives answers that varies arbitrary.

If I have a Empty document, the parse will give me a Error object with code 4.
but when I use code_to_s on that object it some times returns "DOCUMENT EMPTY" and sometimes "DTD"

I believe it is because the constants defined in Error are not prefixed (as they are in libxml), hence there are two constants with the same value:

irb(main):004:0&amp;gt; XML::Error.const_get("DTD")
=&amp;gt; 4
irb(main):005:0&amp;gt; XML::Error.const_get("DOCUMENT_EMPTY")
=&amp;gt; 4

Jarl


----------------------------------------------------------------------

Date: 2011-04-25 14:13

Message:
both those constants in the underlying libxml library have a value of #4.

They do come from different enums:

typedef enum {
    XML_ERR_OK = 0,
    XML_ERR_INTERNAL_ERROR, /* 1 */
    XML_ERR_NO_MEMORY, /* 2 */
    XML_ERR_DOCUMENT_START, /* 3 */
    XML_ERR_DOCUMENT_EMPTY, /* 4 */
    ...
} xmlParserErrors;


typedef enum {
    XML_FROM_DTD,/* The XML DTD validation with parser context*/
....
} xmlErrorDomain;


So the first one is the actual error, the second one is where the error came from.  Perhaps we could have added two separate classes, one for each enum, but that didn't seem worth doing since the usage should be fairly separate.  One is error.code, one is error.domain.

Hope that helps - not seeing that there is a bug here.

Charlie

----------------------------------------------------------------------

Comment By: Jarl Friis (jarl)
Date: 2011-04-25 11:42

Message:
So what is the reason that this bug has been marked closed.
Is it fixed? If so, in what version.

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-22 22:19

Message:
The code is correct.  Both XML::DTD and XML::DOCUMENT_EMPTY have the same value.  They come from two different enums defined in Libxml.  A bit confusing I know, but correct.

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Jarl Friis (jarl)
Date: 2010-02-17 06:31

Message:
I have made a workaround file, I would not go so far as to
call it a patch... It's a monkey patch.

In a Rails app, the file can be placed in app/helpers,
which works around the problem. Note also my new
implementation only creates the number to name map once.

Jarl

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27848&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-25T20:13:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1551">
    <title>[ libxml-Bugs-27848 ] Error#code_to_s givesincosistent answer (sometimes wrong)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1551</link>
    <description>&lt;pre&gt;Bugs item #27848, was opened at 2010-02-17 13:52
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27848&amp;amp;group_id=494

Category: General
Group: None
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Jarl Friis (jarl)
Assigned to: Charlie Savage (cfis)
Summary: Error#code_to_s gives incosistent answer (sometimes wrong)

Initial Comment:
Hi.

Version 1.1.3

I experience that LibXML::XML::Error#code_to_s gives answers that varies arbitrary.

If I have a Empty document, the parse will give me a Error object with code 4.
but when I use code_to_s on that object it some times returns "DOCUMENT EMPTY" and sometimes "DTD"

I believe it is because the constants defined in Error are not prefixed (as they are in libxml), hence there are two constants with the same value:

irb(main):004:0&amp;gt; XML::Error.const_get("DTD")
=&amp;gt; 4
irb(main):005:0&amp;gt; XML::Error.const_get("DOCUMENT_EMPTY")
=&amp;gt; 4

Jarl


----------------------------------------------------------------------

Date: 2011-04-25 19:42

Message:
So what is the reason that this bug has been marked closed.
Is it fixed? If so, in what version.

----------------------------------------------------------------------

Comment By: Charlie Savage (cfis)
Date: 2011-04-23 06:19

Message:
The code is correct.  Both XML::DTD and XML::DOCUMENT_EMPTY have the same value.  They come from two different enums defined in Libxml.  A bit confusing I know, but correct.

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Jarl Friis (jarl)
Date: 2010-02-17 14:31

Message:
I have made a workaround file, I would not go so far as to
call it a patch... It's a monkey patch.

In a Rails app, the file can be placed in app/helpers,
which works around the problem. Note also my new
implementation only creates the number to name map once.

Jarl

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27848&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-25T17:42:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1550">
    <title>[ libxml-Bugs-25203 ] Calling find without anamespace core dumps on the second error.</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1550</link>
    <description>&lt;pre&gt;Bugs item #25203, was opened at 2009-04-06 13:38
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=25203&amp;amp;group_id=494

Category: General
Group: None
Priority: 3
Submitted By: John Gorman (jgorman)
Summary: Calling find without a namespace core dumps on the second error.

Initial Comment:
This programs demonstrates a bug in libxml-ruby-1.1.3
running ruby 1.8.5 (2006-08-25) [i386-linux] on CentOS 5.3.

Calling find without a namespace core dumps on the second error.

See the simple attached program to reproduce the problem.

Thanks!

----------------------------------------------------------------------

Date: 2011-04-22 22:41

Message:
This has been fixed in the latest release.

Thanks for the report - Charlie

----------------------------------------------------------------------

Comment By: John Gorman (jgorman)
Date: 2009-04-07 10:52

Message:
Actually, any namespace error of any kind in the same ruby
process will core dump on the second error. Yikes. Kills
rails in a hurry.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=25203&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-23T04:41:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1549">
    <title>[ libxml-Bugs-27977 ] libxml-ruby-1.1.3 failing test</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1549</link>
    <description>&lt;pre&gt;Bugs item #27977, was opened at 2010-03-16 16:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27977&amp;amp;group_id=494

Category: General
Group: None
Status: Open
Priority: 3
Submitted By: Matthew Kent (mattkent)
Summary: libxml-ruby-1.1.3 failing test

Initial Comment:
Packaging libxml-ruby for CentOS 5.4 and I'm getting one failing test

  1) Failure:
test_mode(TestReader) [./test/tc_reader.rb:178]:
&amp;lt;3&amp;gt; expected but was
&amp;lt;5&amp;gt;.

289 tests, 1284 assertions, 1 failures, 0 errors

looks like it's still in XML::Reader::MODE_READING mode

This is with

libxml2-2.6.26-2.1.2.8
libxml2-devel-2.6.26-2.1.2.8

----------------------------------------------------------------------

Date: 2011-04-22 22:40

Message:
Could you try the latest version?

Thanks - Chalrie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27977&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-23T04:40:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1548">
    <title>[ libxml-Bugs-27256 ] LoadError - Symbol not found:_xmlAddChild</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1548</link>
    <description>&lt;pre&gt;Bugs item #27256, was opened at 2009-10-08 09:14
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27256&amp;amp;group_id=494

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Joshua Lippiner (jlippiner)
Summary: LoadError - Symbol not found: _xmlAddChild 

Initial Comment:
My system appears to have 1.1.2 AND 1.1.3 installed.   Im running Snow Leopard.  Also, I cannot uninstall 1.1.2 for whatever reason.

11:11 AM ~/projects/v16 =&amp;gt; console
Loading development environment (Rails 2.3.4)
Loading haml-edge gem.
LoadError: dlopen(/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle, 9): Symbol not found: _xmlAddChild
  Referenced from: /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle
  Expected in: flat namespace
 in /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle - /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle
from /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle


----------------------------------------------------------------------

Date: 2011-04-22 21:47

Message:
Hi guys,

I know this is pretty old - and I have no idea what could be causing it.  Does the latest release have the same problem?

Thanks - Charlie

----------------------------------------------------------------------

Comment By: Graeme Mathieson (mathie)
Date: 2010-11-23 06:28

Message:
Hi,

I think I might be stumbling across the same problem. I've had a wee dig around and think I might have some further information, but I'm not entirely sure what to make of it.

First of all, some background. We have a CI server to verify that the tests are passing. It runs through the following process:

* Grab the latest code
* Create an empty RVM gemset
* Use gem bundler to install all the gem dependencies
* Run the test suite.

Sounds good? It is, most of the time. Once in a while, though, when attempting to run the test suite, we get:

dlopen(/Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle, 9): Symbol not found: _cXMLNode
 Referenced from: /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle
 Expected in: flat namespace
 in /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle - /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle

This doesn't happen on all runs, and re-running the CI build with the same commit often makes it work again later, so I'm reasonably(ish!) confident it's not an app problem. This is a CI server that I'm not actively messing with either, so I'm reasonably happy that the environment is stable.

So, I dug in a little. It's right, that bundle doesn't have the symbol it's looking for. In fact, the bundle doesn't have any symbols:

$ nm libxml-ruby-1.1.4-broken/lib/libxml_ruby.bundle 
0000000000000000 t __mh_bundle_header
                 U dyld_stub_binder

That's weird, right? Well, weirder still, none of the object files have any symbols:

$ nm libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o

produces nothing. So, gcc is producing a file without any symbols. What kind of file is it producing?

$ file libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o
libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o: 80386 COFF executable not stripped - version 30821

That's weird, because a correctly built version is a Mach-O 64 bit object file as you'd expect:

$ file libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o
libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o: Mach-O 64-bit object x86_64

Apart from the generated objects and bundles, there are no appreciable differences between the broken version and the working version:


$ diff -urN libxml-ruby-1.1.4-{broken,working}
diff -urN libxml-ruby-1.1.4-broken/ext/libxml/Makefile libxml-ruby-1.1.4-working/ext/libxml/Makefile
--- libxml-ruby-1.1.4-broken/ext/libxml/Makefile2010-11-23 12:02:32.000000000 +0000
+++ libxml-ruby-1.1.4-working/ext/libxml/Makefile2010-11-23 11:32:32.000000000 +0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -96,8 +96,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 BINDIR        = $(bindir)
 RUBYCOMMONDIR = $(sitedir)$(target_prefix)
-RUBYLIBDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix)
-RUBYARCHDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix)
+RUBYLIBDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix)
+RUBYARCHDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix)
 
 TARGET_SO     = $(DLLIB)
 CLEANLIBS     = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
diff -urN libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log libxml-ruby-1.1.4-working/ext/libxml/mkmf.log
--- libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log2010-11-23 12:02:32.000000000 +0000
+++ libxml-ruby-1.1.4-working/ext/libxml/mkmf.log2010-11-23 11:32:32.000000000 +0000
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,7 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 have_library: checking for socket() in -lsocket... -------------------- no
 
 "gcc -o conftest -I. -I/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -g -O2  -pipe -fno-common   conftest.c  -L. -L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib -L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib -L.      -lruby-static -lsocket  -ldl -lobjc  "
-/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: Insecure world writable dir /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-5839/bin in PATH, mode 040777
+/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: Insecure world writable dir /Users/ci/.rvm/gems/ree-1.8.7-2010.02&amp;lt; at &amp;gt;cruise-3367/bin in PATH, mode 040777
 conftest.c: In function ‘t’:
 conftest.c:3: error: ‘socket’ undeclared (first use in this function)
 conftest.c:3: error: (Each undeclared identifier is reported only once

The host environment here is Mac OS X 10.6.5, we're using Ruby Enterprise Edition 2010.02 (1.8.7), and we're using the Mac OS X-supplied libxml2:

$ which xml2-config
/usr/bin/xml2-config
$ xml2-config --version
2.7.3

I have no idea where to go next while tracking this down! Any suggestions?

----------------------------------------------------------------------

Comment By: Jim Tobin (tobinjim)
Date: 2010-04-18 06:06

Message:
I see this, too.  Both the reporting of 1.1.2 and 1.1.3 installed, and the missing symbol.  Curiously, my Leopard machine does not report a missing symbol, and it has 1.1.3, 0.9.5 and 0.3.8.4 installed

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27256&amp;amp;group_id=494
_______________________________________________
libxml-devel mailing list
libxml-devel&amp;lt; at &amp;gt;rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-23T03:47:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1547">
    <title>[ libxml-Bugs-27438 ] libxml-ruby-1.1.3 - Schemavalidation for schema containing xs:any</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1547</link>
    <description>&lt;pre&gt;Bugs item #27438, was opened at 2009-11-15 22:18
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27438&amp;amp;group_id=494

Category: General
Group: None
Status: Open
Priority: 3
Submitted By: Sudhindra K (sudhi312)
Summary: libxml-ruby-1.1.3 - Schema validation for schema containing xs:any

Initial Comment:
Hi,

I cannot get the schema validation working for a schema containing &amp;lt;xs:any namespace="##other" /&amp;gt; . From the forum I cam to know that this is a known limitation, considering that this is so frequently used by schema developers can this be fixed?

My question to forum and the reply -- 

---------- Forwarded message ----------
From: Darko Miletic &amp;lt;darko&amp;lt; at &amp;gt;uvcms.com&amp;gt;
Date: Wed, Nov 11, 2009 at 6:50 PM
Subject: Re: [xml] Regarding LibXML Schema validation
To: Sudhindra Kulkarni &amp;lt;kulkarni.sudhi&amp;lt; at &amp;gt;gmail.com&amp;gt;
Cc: xml&amp;lt; at &amp;gt;gnome.org




Sudhindra Kulkarni wrote:


Hi,

I have a problem validating a xml generated from a schema which contains an element having &amp;lt;xs:any namespace="##other" /&amp;gt;. When I try to include a element from another schema I get an error

"No matching global element declaration available but demanded by the strict wildcard"


This is a limitation of libxml. You must have all declarations from all schemas in one file. So if your xml file uses 6 schemas in order to validate them in libxml you must create new schema that includes all 6 separate schemas and than use that xsd for validation. Something like this:

&amp;lt;?xml version = "1.0" encoding = "UTF-8"?&amp;gt;
&amp;lt;xs:schema xmlns    ="http://dummy.libxml2.validator"
  targetNamespace ="http://dummy.libxml2.validator"
  xmlns:xs        ="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi       ="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:&amp;lt;somenamespace&amp;gt;     ="&amp;lt;namespaceurl&amp;gt;"
  xmlns:&amp;lt;somenamespace2&amp;gt;     ="&amp;lt;namespaceurl2&amp;gt;"
  xmlns:&amp;lt;somenamespace3&amp;gt;     ="&amp;lt;namespaceurl3&amp;gt;"

  version="1.0"
  elementFormDefault  ="qualified"
  attributeFormDefault="unqualified"     &amp;gt;
    &amp;lt;xs:import namespace ="&amp;lt;namespaceurl&amp;gt;" schemaLocation = "&amp;lt;schema location&amp;gt;"                     /&amp;gt;
  &amp;lt;xs:import namespace ="&amp;lt;namespaceurl2&amp;gt;" schemaLocation = "&amp;lt;schema location2&amp;gt;"                     /&amp;gt;
  &amp;lt;xs:import namespace ="&amp;lt;namespaceurl3&amp;gt;" schemaLocation = "&amp;lt;schema location3&amp;gt;"                     /&amp;gt;

&amp;lt;/xs:schema&amp;gt;



--------------

Regards,
Sudhindra

----------------------------------------------------------------------

Date: 2011-04-22 23:50

Message:
Hi Sudhindra,

Do you still want us to look into this issue?

Thanks - Charlie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=27438&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-23T05:50:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1546">
    <title>[ libxml-Bugs-26562 ] Invalid free when using XMLSAX parser</title>
    <link>http://comments.gmane.org/gmane.comp.lang.ruby.modules.libxml.devel/1546</link>
    <description>&lt;pre&gt;Bugs item #26562, was opened at 2009-07-08 10:28
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=26562&amp;amp;group_id=494

Category: None
Group: None
Priority: 3
Submitted By: Todd Fisher (taf2)
Summary: Invalid free when using XML SAX parser

Initial Comment:
I'm running a fairly complex script, combination of a few different binaries... right now this is what i know is happening from valgrind:

==11639== Invalid free() / delete / delete[]
==11639==    at 0x4C2433D: free (vg_replace_malloc.c:323)
==11639==    by 0xD5AB4CA: xmlFreeParserCtxt (in /usr/lib64/libxml2.so.2.7.3)
==11639==    by 0x4E77D51: (within /usr/lib64/libruby.so.1.8.6)
==11639==    by 0x4E780E6: ruby_xmalloc (in /usr/lib64/libruby.so.1.8.6)
==11639==    by 0xC69C7BE: alloc_hpricot_struct (hpricot_scan.rl:618)
==11639==    by 0x4E62E00: (within /usr/lib64/libruby.so.1.8.6)
==11639==    by 0x4E62FFC: (within /usr/lib64/libruby.so.1.8.6)
==11639==    by 0x4E63D17: (within /usr/lib64/libruby.so.1.8.6)
==11639==    by 0x4E63FC4: rb_funcall (in /usr/lib64/libruby.so.1.8.6)
==11639==    by 0x4E8E06E: rb_obj_alloc (in /usr/lib64/libruby.so.1.8.6)
==11639==    by 0xC69CD13: rb_hpricot_token (hpricot_scan.rl:302)
==11639==    by 0xC6A7A20: hpricot_scan (hpricot_scan.rl:68)
==11639==  Address 0xd5773a0 is 0 bytes inside data symbol "rxml_sax_handler"


I will work on reducing this to a easier to reproduce test case... 

----------------------------------------------------------------------

Date: 2011-04-22 22:55

Message:
This is fixed in the latest release.

Thanks for the report - Charlie

----------------------------------------------------------------------

Comment By: Marcin Raczkowski (swistak)
Date: 2009-10-28 16:07

Message:
I'm expiriencing something similar:

 Starting parsing #FOG_Product_20091026171339.xml
with_libxml.rb:44:in `parse': undefined method `on_error' for false:FalseClass (NoMethodError)
        from with_libxml.rb:44:in `parse'
        from with_libxml.rb:53
*** glibc detected *** ruby: free(): invalid pointer: 0xb77787a0 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7c6e1d4]
/lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7c70186]
/usr/lib/libxml2.so.2(xmlFreeParserCtxt+0xe1)[0xb7641fd1]
/usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so[0xb776138d]
ruby(rb_gc_call_finalizer_at_exit+0x9f)[0x80e787f]
ruby[0x80cf899]
ruby(ruby_cleanup+0x168)[0x80dc738]
ruby(ruby_stop+0x11)[0x80dc831]
ruby[0x80e0360]
ruby(SHA1_Update+0x28f)[0x80646ef]
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7c15775]
ruby(SHA1_Update+0x1b1)[0x8064611]


source code of the script: http://pastie.org/674111

XML is big (&amp;gt; 2GB) but it doesn't seem to have problem with even bigger ones(&amp;gt; 5GB), so I don't think that's the issue,

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&amp;amp;atid=1971&amp;amp;aid=26562&amp;amp;group_id=494
&lt;/pre&gt;</description>
    <dc:creator>noreply&lt; at &gt;rubyforge.org</dc:creator>
    <dc:date>2011-04-23T04:55:41</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.ruby.modules.libxml.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.ruby.modules.libxml.devel</link>
  </textinput>
</rdf:RDF>

