Tietewです。

REXMLで比較的大きなXHTMLをパースしていると、たまにSEGVします。同
じ文章をパースしても起こるときと起こらないときがあり、不安定です。

微妙にバージョンが古いのですがとりあえず報告しておきます。


/usr/local/lib/ruby/1.8/rexml/text.rb:324: [BUG] Segmentation fault
ruby 1.8.5 (2006-07-28) [i686-linux]

(gdb) bt
#0  0xb7db983b in raise () from /lib/tls/libc.so.6
#1  0xb7dbafa2 in abort () from /lib/tls/libc.so.6
#2  0xb7f3ec61 in rb_bug (fmt=0x0) at error.c:214
#3  0xb7fa7012 in sigsegv (sig=11) at signal.c:537
#4  <signal handler called>
#5  0xb7e040dd in mallopt () from /lib/tls/libc.so.6
#6  0xb7e038fb in mallopt () from /lib/tls/libc.so.6
#7  0xb7e02c43 in malloc () from /lib/tls/libc.so.6
#8  0xb7f60197 in ruby_xmalloc (size=208) at gc.c:121
#9  0xb7f99116 in ruby_re_compile_pattern (pattern=0x831a8a0 "&amp;", size=5,
    bufp=0x81452e0) at regex.c:2450
#10 0xb7f94f53 in make_regexp (s=0x831a8a0 "&amp;", len=5, flags=0) at re.c:643
#11 0xb7f960fb in rb_reg_initialize (obj=3082846040, s=0x831a8a0 "&amp;",
    len=5, options=0) at re.c:1373
#12 0xb7f962c6 in rb_reg_new (s=0x8392840 "a", len=137963584,
    options=137963584) at re.c:1407
#13 0xb7f4914a in rb_eval (self=3083084920, n=0x8392840) at eval.c:3837
#14 0xb7f47285 in rb_eval (self=3083084920, n=0x8392840) at eval.c:3636
#15 0xb7f4ab3a in rb_yield_0 (val=3082846200, self=3083084920, klass=0,
    flags=0, avalue=0) at eval.c:4989
#16 0xb7f4b169 in rb_yield (val=137963584) at eval.c:5071
#17 0xb7f30c17 in rb_ary_each (ary=3082846320) at array.c:1130
#18 0xb7f5a44e in call_cfunc (func=0xb7f30be0 <rb_ary_each>, recv=3082846320,
    len=137963584, argc=135750152, argv=0x0) at eval.c:5659
#19 0xb7f4c950 in rb_call0 (klass=3084420520, recv=3082846320, id=3825,
    oid=137963584, argc=0, argv=0x0, body=0xb7d88184, flags=0) at eval.c:5812
#20 0xb7f4d3e6 in rb_call (klass=3084420520, recv=3082846320, mid=3825,
    argc=0, argv=0x0, scope=0) at eval.c:6042
#21 0xb7f4796d in rb_eval (self=3083084920, n=0x8392840) at ruby.h:654
#22 0xb7f46cd6 in rb_eval (self=3083084920, n=0x8392840) at eval.c:3175
#23 0xb7f45ff9 in rb_eval (self=3083084920, n=0x8392840) at eval.c:2917
#24 0xb7f4ccd6 in rb_call0 (klass=3083084900, recv=3083084920, id=23377,
    oid=137963584, argc=0, argv=0xbfffa360, body=0xb7d0c6c4, flags=0)
    at eval.c:5948
#25 0xb7f4d3e6 in rb_call (klass=3083084900, recv=3083084920, mid=23377,
    argc=2, argv=0xbfffa358, scope=0) at eval.c:6042
#26 0xb7f4796d in rb_eval (self=3082191020, n=0x8392840) at ruby.h:654
#27 0xb7f472de in rb_eval (self=3082191020, n=0x8392840) at eval.c:3646
#28 0xb7f4ccd6 in rb_call0 (klass=3083084860, recv=3082191020, id=5145,
    oid=137963584, argc=0, argv=0x0, body=0xb7d53254, flags=0) at eval.c:5948
#29 0xb7f4d3e6 in rb_call (klass=3083084860, recv=3082191020, mid=5145,
    argc=0, argv=0x0, scope=0) at eval.c:6042
#30 0xb7f4796d in rb_eval (self=3082191260, n=0x8392840) at ruby.h:654
#31 0xb7f494dc in rb_eval (self=3082191260, n=0x8392840) at eval.c:3389
#32 0xb7f4ccd6 in rb_call0 (klass=3082876560, recv=3082191260, id=332,
    oid=137963584, argc=0, argv=0xbfffc14c, body=0xb7c91604, flags=0)
    at eval.c:5948
#33 0xb7f4d3e6 in rb_call (klass=3082876560, recv=3082191260, mid=332, argc=1,
    argv=0xbfffc148, scope=0) at eval.c:6042
---Type <return> to continue, or q <return> to quit---
#34 0xb7f4796d in rb_eval (self=3084446200, n=0x8392840) at ruby.h:654
#35 0xb7f482f4 in rb_eval (self=3084446200, n=0x8392840) at eval.c:2944
#36 0xb7f4635c in rb_eval (self=3084446200, n=0x8392840) at eval.c:3006
#37 0xb7f4ab3a in rb_yield_0 (val=3082198520, self=3084446200, klass=0,
    flags=0, avalue=0) at eval.c:4989
#38 0xb7f4b169 in rb_yield (val=137963584) at eval.c:5071
#39 0xb7f30c17 in rb_ary_each (ary=3082182040) at array.c:1130
#40 0xb7f5a44e in call_cfunc (func=0xb7f30be0 <rb_ary_each>, recv=3082182040,
    len=137963584, argc=135750152, argv=0x0) at eval.c:5659
#41 0xb7f4c950 in rb_call0 (klass=3084420520, recv=3082182040, id=3825,
    oid=137963584, argc=0, argv=0x0, body=0xb7d88184, flags=0) at eval.c:5812
#42 0xb7f4d3e6 in rb_call (klass=3084420520, recv=3082182040, mid=3825,
    argc=0, argv=0x0, scope=0) at eval.c:6042
#43 0xb7f4796d in rb_eval (self=3084446200, n=0x8392840) at ruby.h:654
#44 0xb7f46cd6 in rb_eval (self=3084446200, n=0x8392840) at eval.c:3175
#45 0xb7f4ab3a in rb_yield_0 (val=3082482660, self=3084446200, klass=0,
    flags=0, avalue=0) at eval.c:4989
#46 0xb7f4b169 in rb_yield (val=137963584) at eval.c:5071
#47 0xb7f30c17 in rb_ary_each (ary=3082498320) at array.c:1130
#48 0xb7f5a44e in call_cfunc (func=0xb7f30be0 <rb_ary_each>, recv=3082498320,
    len=137963584, argc=135750152, argv=0x0) at eval.c:5659
#49 0xb7f4c950 in rb_call0 (klass=3084420520, recv=3082498320, id=3825,
    oid=137963584, argc=0, argv=0x0, body=0xb7d88184, flags=0) at eval.c:5812
#50 0xb7f4d3e6 in rb_call (klass=3084420520, recv=3082498320, mid=3825,
    argc=0, argv=0x0, scope=0) at eval.c:6042
#51 0xb7f4796d in rb_eval (self=3084446200, n=0x8392840) at ruby.h:654
#52 0xb7f46cd6 in rb_eval (self=3084446200, n=0x8392840) at eval.c:3175
#53 0xb7f438cc in ruby_exec_internal () at eval.c:1606
#54 0xb7f43924 in ruby_exec () at eval.c:1626
#55 0xb7f43961 in ruby_run () at eval.c:1636
#56 0x080486f3 in main (argc=137963584, argv=0x8392840, envp=0xbffff9c0)
    at main.c:46





―[ Tietew ]――――――――――――――――――――――――――
 メ : tietew / tietew.net / tietew / raug.net / tietew / masuclub.net
ホペ: http://www.tietew.net/     Tietew Windows Lab.
      http://www.masuclub.net/   鱒倶楽部
指紋: 26CB 71BB B595 09C4 0153  81C4 773C 963A D51B 8CAA