[Bug #2727] make: *** [encdb.h] Aborted

Bug #2727: make: *** [encdb.h] Aborted
http://redmine.ruby-lang.org/issues/show/2727

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: High
e$B%+%F%4%je(B: build
ruby -v: ruby 1.9.1p420 (2010-02-04 revision 26571) [i686-linux]

Ubuntu 9.10 e$B$N4D6-$Ge(B ruby_1_9_1 e$B$re(B make e$B$9$k$He(B encdb.h
e$B$N$H$3$m$G%"%!<%H$7$^$9!#e(B
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) e$B$J$N$Ge(B #1299
e$B$H;w$F$$$k5$$,$7$^$9$,!"$h$/$o$+$j$^$;$s$G$7$?!#e(B

./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib -I.ext/common
-I./- -r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h
/home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl
/home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310: [BUG]
Segmentation fault
ruby 1.9.1p420 (2010-02-04 revision 26571) [i686-linux]

– control frame ----------
c:0013 p:---- s:0060 b:0060 l:000059 d:000059 CFUNC :catch
c:0012 p:0049 s:0056 b:0056 l:001d30 d:001024 BLOCK
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310
c:0011 p:---- s:0050 b:0050 l:000049 d:000049 FINISH
c:0010 p:---- s:0048 b:0048 l:000047 d:000047 CFUNC :catch
c:0009 p:0062 s:0044 b:0044 l:001d30 d:001d30 METHOD
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258
c:0008 p:0024 s:0034 b:0034 l:000033 d:000033 METHOD
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1252
c:0007 p:0066 s:0029 b:0029 l:000c7c d:0004f8 BLOCK
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:12
c:0006 p:0116 s:0026 b:0026 l:000025 d:000025 METHOD
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:793
c:0005 p:---- s:0020 b:0020 l:000019 d:000019 FINISH
c:0004 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :new
c:0003 p:0069 s:0015 b:0015 l:000c7c d:001ae8 EVAL
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000c7c d:000c7c TOP

– Ruby level backtrace
information-----------------------------------------
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310:in catch' /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1310:inblock in
parse_in_order’
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258:in catch' /home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1258:inparse_in_order’
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:1252:in order!' /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:12:inblock
in ’
/home/kazu/wc/ruby/branches/ruby_1_9_1/lib/optparse.rb:793:in
initialize' /home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8:innew’
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb:8:in `’

– C level backtrace information

0x816a589 ./miniruby(rb_vm_bugreport+0x69) [0x816a589]
0x808674f ./miniruby [0x808674f]
0x80867ea ./miniruby(rb_bug+0x3a) [0x80867ea]
0x8111974 ./miniruby [0x8111974]
0x4001d410 [0x4001d410]
0x8158368 ./miniruby [0x8158368]
0x81586a4 ./miniruby [0x81586a4]
0x81631a6 ./miniruby [0x81631a6]
0x815e40a ./miniruby [0x815e40a]
0x81617b9 ./miniruby [0x81617b9]
0x8167f16 ./miniruby [0x8167f16]
0x8158368 ./miniruby [0x8158368]
0x81586a4 ./miniruby [0x81586a4]
0x81631a6 ./miniruby [0x81631a6]
0x815e40a ./miniruby [0x815e40a]
0x81617b9 ./miniruby [0x81617b9]
0x81637c3 ./miniruby [0x81637c3]
0x815af7e ./miniruby(rb_funcall2+0xfe) [0x815af7e]
0x8087a60 ./miniruby(rb_obj_call_init+0x50) [0x8087a60]
0x80bd48a ./miniruby(rb_class_new_instance+0x3a) [0x80bd48a]
0x8158368 ./miniruby [0x8158368]
0x81586a4 ./miniruby [0x81586a4]
0x81631a6 ./miniruby [0x81631a6]
0x815e40a ./miniruby [0x815e40a]
0x81617b9 ./miniruby [0x81617b9]
0x8161a0b ./miniruby(rb_iseq_eval_main+0xab) [0x8161a0b]
0x8088737 ./miniruby(ruby_exec_node+0xb7) [0x8088737]
0x8089d46 ./miniruby(ruby_run_node+0x56) [0x8089d46]
0x805cfde ./miniruby(main+0x7e) [0x805cfde]
0x400ccb56 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)
[0x400ccb56]
0x805cec1 ./miniruby [0x805cec1]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [encdb.h] Aborted

gdb [email protected]$He(B th e$B$,e(B 0xffffffff
e$B$K$J$C$F$$$Fe(B th->errinfo e$B$GMn$A$F$$$k$h$&$G$9!#e(B

% gdb --args ./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib
-I.ext/common -I./-
-r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h
/home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl
/home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc
GNU gdb (GDB) 7.0-ubuntu
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
http://gnu.org/licenses/gpl.html
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 “i486-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/
Reading symbols from
/home/kazu/build/ruby/ruby_1_9_1/ruby/miniruby…done.
(gdb) r
Starting program: /home/kazu/build/ruby/ruby_1_9_1/ruby/miniruby
-I/home/kazu/wc/ruby/branches/ruby_1_9_1/lib -I.ext/common -I./-
-r/home/kazu/wc/ruby/branches/ruby_1_9_1/ext/purelib.rb
/home/kazu/wc/ruby/branches/ruby_1_9_1/tool/generic_erb.rb -c -o encdb.h
/home/kazu/wc/ruby/branches/ruby_1_9_1/template/encdb.h.tmpl
/home/kazu/wc/ruby/branches/ruby_1_9_1/enc enc
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c00b70 (LWP 14843)]

Program received signal SIGSEGV, Segmentation fault.
0x08167f46 in rb_f_catch (argc=1, argv=0xb7c010ec)
at /home/kazu/wc/ruby/branches/ruby_1_9_1/vm_eval.c:1258
1258 else if (state == TAG_THROW && RNODE(th->errinfo)->u1.value
== tag) {
(gdb) p state == TAG_THROW
$1 = 1
(gdb) p th
$2 = (rb_thread_t *) 0xffffffff
(gdb)

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Motohiro KOSAKI)

Ubuntu 10.04e$B&Be(B x86_64, gcc version 4.4.3 (Ubuntu 4.4.3-2ubuntu2)
e$B$G;n$7$F$$^$7$?$,:F8=$7$^$;$s$G$7$?!#e(Bgcce$B$N%P!<%8%g%s$He(BCPUe$B%"!<%-$NN>J}$K:90[$,$"$k$N$G!"<c439J$j9~$$,<e$$$G$9$,$4Js9p$^$G!#e(B

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE)

minirubye$B$,2u$l$F$$$k$h$&$K;W$($k$N$G!"e(Bmake test
[email protected]$1$^$;$s$+!#e(B
e$B$=$3$^$G$$$1$P<B9T2DG=$J$O$:$J$N$G!#e(B

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Kazuhiro NISHIYAMA)

make test
e$B$G$bF1$8>[email protected]$C$?$N$G!"3:EvItJ,$r8+$F:G>.%1!<%9$rD4$Y$F$_$k$He(B
catch e$B$7$?;[email protected]$GMn$A$F$$$k$h$&$G$9!#e(B

% make test

sample/test.rb:assignment

sample/test.rb:condition …
sample/test.rb:if/unless …
sample/test.rb:case …
sample/test.rb:while/until …
sample/test.rb:exception
…/home/kazu/wc/ruby/branches/ruby_1_9_1/sample/test.rb:713:
[BUG] Segmentation fault
ruby 1.9.1p420 (2010-02-04 revision 26571) [i686-linux]

– control frame ----------
c:0004 p:---- s:0053 b:0053 l:000052 d:000052 CFUNC :catch
c:0003 p:14355 s:0049 b:0048 l:0017dc d:0007cc EVAL
/home/kazu/wc/ruby/branches/ruby_1_9_1/sample/test.rb:713
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0017dc d:0017dc TOP

– Ruby level backtrace
information-----------------------------------------
/home/kazu/wc/ruby/branches/ruby_1_9_1/sample/test.rb:713:in catch' /home/kazu/wc/ruby/branches/ruby_1_9_1/sample/test.rb:713:in

– C level backtrace information

0x4014a1e9
/home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_vm_bugreport+0x69)
[0x4014a1e9]
0x400663af /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x400663af]
0x4006644a
/home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_bug+0x3a)
[0x4006644a]
0x400f15d4 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x400f15d4]
0x4001d410 [0x4001d410]
0x40137fc8 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x40137fc8]
0x40138304 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x40138304]
0x40142e06 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x40142e06]
0x4013e06a /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x4013e06a]
0x40141419 /home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1
[0x40141419]
0x4014166b
/home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(rb_iseq_eval_main+0xab)
[0x4014166b]
0x40068397
/home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(ruby_exec_node+0xb7)
[0x40068397]
0x400699a6
/home/kazu/build/ruby/ruby_1_9_1/ruby/libruby-1.9.1.so.1.9.1(ruby_run_node+0x56)
[0x400699a6]
0x804887e /home/kazu/build/ruby/ruby_1_9_1/ruby/ruby-1.9.1(main+0x7e)
[0x804887e]
0x40254b56 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)
[0x40254b56]
0x8048761 /home/kazu/build/ruby/ruby_1_9_1/ruby/ruby-1.9.1 [0x8048761]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

test failed
make: *** [test-sample] e$B%(%i!<e(B 1

% ./miniruby -e ‘catch(:foo){}’
% ./miniruby -e ‘catch(:foo){throw :bar}’
-e:1:in throw': uncaught throw :bar (ArgumentError) from -e:1:inblock in ’
from -e:1:in catch' from -e:1:in
% ./miniruby -e ‘catch(:foo){throw :foo}’
-e:1: [BUG] Segmentation fault
ruby 1.9.1p420 (2010-02-04 revision 26571) [i686-linux]

– control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :catch
c:0003 p:0011 s:0006 b:0006 l:0010ec d:00218c EVAL -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0010ec d:0010ec TOP

– Ruby level backtrace
information-----------------------------------------
-e:1:in catch' -e:1:in

– C level backtrace information

0x816a589 ./miniruby(rb_vm_bugreport+0x69) [0x816a589]
0x808674f ./miniruby [0x808674f]
0x80867ea ./miniruby(rb_bug+0x3a) [0x80867ea]
0x8111974 ./miniruby [0x8111974]
0xb7861410 [0xb7861410]
0x8158368 ./miniruby [0x8158368]
0x81586a4 ./miniruby [0x81586a4]
0x81631a6 ./miniruby [0x81631a6]
0x815e40a ./miniruby [0x815e40a]
0x81617b9 ./miniruby [0x81617b9]
0x8161a0b ./miniruby(rb_iseq_eval_main+0xab) [0x8161a0b]
0x8088737 ./miniruby(ruby_exec_node+0xb7) [0x8088737]
0x8089d46 ./miniruby(ruby_run_node+0x56) [0x8089d46]
0x805cfde ./miniruby(main+0x7e) [0x805cfde]
0xb769ab56 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)
[0xb769ab56]
0x805cec1 ./miniruby [0x805cec1]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html


http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Kazuhiro NISHIYAMA)

e$B$$$/$D$+$N4D6-$G;n$7$F$_$?$H$3$m!"e(BFedora 11 e$B$N!Ve(Bgcc version
4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)e$B!We(B(gcc-4.4.1-2.fc11.i586)
e$B$G$b:F8=$7$^$7$?!#e(B

e$B:GE,2=$N1F6A$+$H;W$C$Fe(B Ubuntu 9.10 e$B$Ge(B optflags=-O0 e$B$de(B
optflags=-O1 e$B$de(B optflags=-O3 e$B$r;n$7$F$_$?$H$3$m!Ve(B./miniruby
-e 'catch(:foo){throw :foo}'e$B!W$OMn$A$J$/$J$j$^$7$?!#e(B

amd64 [email protected]$H:F8=$7$J$+$C$?$je(B gcc
e$B$N%P!<%8%g%s$,0c$&$H:F8=$7$J$+$C$?$j$9$k$h$&$J$N$G!"e(Bx86 e$B$Ne(B
gcc 4.4.1 e$B$N:GE,2=$N%P%[email protected]$,9b$=$&$G$9!#e(B

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BThird Party’s Issuee$B$KJQ99e(B

e$B1sF#$G$9!#e(B

e$B$d$O$j$$=$i$/e(B gcc 4.4.1 e$B$N%P%[email protected]$H;W$$$^$9!#e(B
e$BD4$Y$F$_$?$H$3$m!"e(Binline e$BE83+$7$?e(B callee e$B$,$J$<$+e(B
caller e$B$N%9%?%C%/$re(B
e$B=q$-DY$7$F$$$k$h$&$J5$$,$7$^$9!#e(B
e$B$H$$$&$3$H$G!"e(BThird Party’s issue e$B$H$7$F$
$-$^$9!#e(B


Yusuke E. [email protected]

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

Hi Lucas,

I’m suspecting that there is a bug in gcc 4.4.1.
A local variable of caller seems to be changed by callee if the
callee is inlined. You can avoid this issue by using -O0 or -O1.

If you have anything to indicate ruby’s bug, not gcc’s, please
let us know.

Even if this is gcc’s bug, we have no reluctance to import a
patch to avoid this issue, if you have.


Yusuke E. [email protected]

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Lucas N.)

Yusuke E., why is this marked as “Third Party’s issue” ?

http://redmine.ruby-lang.org/issues/show/2727

e$B%A%1%C%He(B #2727 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE)

e$B0l1~$^$H$a$^$G!#e(B

e$B$3$l$Oe(B gcc 4.4 e$B$Ne(B 32bit e$BHG$GH/@8$9$kLdBj$G!"e(Bcatch
e$B$7$?$H$3$m$GMn$A$k$N$,FCD’$G$9!#e(B
e$BF’$`4D6-$ONc$($Pe(B Ubuntu 9.10e$B!"e(BUbuntu 10.04e$B!"e(BFedora 11
(e$BA4$Fe(B32bit) e$B$J$I$K$J$j$^$9!#e(B

Ruby e$BB&$H$7$F$O!"$3$NLdBj$Oe(B gcc
e$B$N%P%0$G$"$C$F!"FC$K2sHr:v$OF~$l$J$$J}?K$G$9!#e(B

http://redmine.ruby-lang.org/issues/show/2727

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs