Haskell で Wiki 書いた → http://i.loveruby.net/ll/
思ったこと
って Haskell じゃなくて Wiki の話かよ。
(08:31)
いちおうソースコードの入手方法だけはこっちにも書いとくか。
% cvs -d :pserver:anonymous@cvs.loveruby.net:/src co lazylines
パッケージはどんどんバージョン上がるんで書きません。
(08:46)
socket.so もあるみたいだから YARV で BitChannel を試して (落として) みよう。
と思って make ext したら落ちた。話が早いな。
~/c/yarv % ./miniruby ./ext/extmk.rb --dest-dir="" --make=make --mflags=-n --make-flags=n --extout=.ext --extension --extstatic -- compiling Win32API make: Nothing to be done for `all'. compiling bigdecimal make: Nothing to be done for `all'. compiling digest make: Nothing to be done for `all'. compiling digest/md5 make: Nothing to be done for `all'. compiling digest/rmd160 make: Nothing to be done for `all'. compiling digest/sha1 make: Nothing to be done for `all'. compiling digest/sha2 make: Nothing to be done for `all'. compiling etc gcc -fPIC -g -O2 -Wall -I. -I../.. -I../../. -I../.././ext/etc -DHAVE_GETLOGIN -DHAVE_GETPWENT -DHAVE_GETGRENT -DHAVE_ST_PW_GECOS -DHAVE_ST_PW_PASSWD -DHAVE_ST_GR_PASSWD -c etc.c rm -f ../../.ext/x86_64-linux/etc.so mkdir -p ../../.ext/x86_64-linux gcc -shared -L'../..' -o ../../.ext/x86_64-linux/etc.so etc.o -lpthread -ldl -lcrypt -lm -lc compiling socket zsh: 15604 abort (core dumped) ./miniruby ./ext/extmk.rb --dest-dir="" --make=make --mflags=-n --make-flags=
スタックトレース
#0 0x0000002a95b6fdd0 in raise () from /lib/libc.so.6 #1 0x0000002a95b71280 in abort () from /lib/libc.so.6 #2 0x000000000048d15d in rb_bug (fmt=0x4a0ec0 "rb_gc_mark(): unknown data type 0x%lx(%p) %s") at error.c:173 #3 0x000000000041d9b3 in gc_mark_children (ptr=6732432, lev=1) at gc.c:596 #4 0x000000000047c90c in iseq_mark (ptr=0x71e410) at yarvcore.c:401 #5 0x000000000041d901 in gc_mark_children (ptr=182902858312, lev=2) at gc.c:918 #6 0x000000000041d89e in gc_mark_children (ptr=9, lev=1) at gc.c:899 #7 0x000000000047c92a in iseq_mark (ptr=0x71ce40) at yarvcore.c:401 #8 0x000000000041d901 in gc_mark_children (ptr=182902858632, lev=8) at gc.c:918 #9 0x000000000041d55e in mark_entry (key=15692, value=15692, lev=15692) at gc.c:638 #10 0x0000000000465e30 in st_foreach (table=0x6116d0, func=0x41d550 <mark_entry>, arg=7) at st.c:468 #11 0x000000000041d7e1 in gc_mark_children (ptr=182904035944, lev=7) at gc.c:884 #12 0x000000000041d55e in mark_entry (key=15692, value=15692, lev=15692) at gc.c:638 #13 0x0000000000465e30 in st_foreach (table=0x611e00, func=0x41d550 <mark_entry>, arg=6) at st.c:468 #14 0x000000000041d7ed in gc_mark_children (ptr=182904035824, lev=6) at gc.c:885 #15 0x000000000041d7bb in gc_mark_children (ptr=182904035904, lev=5) at gc.c:879 #16 0x000000000041d55e in mark_entry (key=15692, value=15692, lev=15692) at gc.c:638 #17 0x0000000000465e30 in st_foreach (table=0x6120e0, func=0x41d550 <mark_entry>, arg=4) at st.c:468 #18 0x000000000041d7ed in gc_mark_children (ptr=182904035744, lev=4) at gc.c:885 #19 0x000000000041d7bb in gc_mark_children (ptr=182904016904, lev=3) at gc.c:879 #20 0x000000000041d7bb in gc_mark_children (ptr=182904016944, lev=2) at gc.c:879 #21 0x000000000041d7bb in gc_mark_children (ptr=182905577184, lev=1) at gc.c:879 #22 0x000000000041d52f in mark_locations_array (x=0x7fbfffbc60, n=24) at gc.c:620 #23 0x000000000041e4fb in garbage_collect () at gc.c:1307 #24 0x000000000041cc55 in ruby_xmalloc (size=131073) at gc.c:121 #25 0x0000000000465fcb in str_new (klass=15692, ptr=0x0, len=131072) at string.c:83 #26 0x0000000000466079 in rb_tainted_str_new ( ptr=0x3d4c <Address 0x3d4c out of bounds>, len=15692) at string.c:109 #27 0x00000000004243d6 in io_read (argc=15692, argv=0x3d4c, io=182905577344) at io.c:1404 #28 0x000000000047b386 in call_cfunc (func=0x424280 <io_read>, recv=182905577344, len=6, argc=15692, argv=0x3d4c) at call_cfunc.h:24 #29 0x000000000047963a in th_eval (th=0x66ba90, initial=15692) at vm.inc:2023 #30 0x000000000047aff3 in th_eval_body (th=0x66ba90) at vm.c:1129 #31 0x000000000047763d in th_invoke_yield (th=0x66ba90, argc=1, argv=0x7fbfffc840) at vm.c:579 #32 0x0000000000415903 in rb_yield_0 (val=182905577344, self=15692, klass=6, flags=-1, avalue=15692) at yarv.h:49 #33 0x0000000000416262 in rb_ensure (b_proc=0x4159a0 <rb_yield>, data1=182905577344, e_proc=0x425010 <io_close>, data2=182905577344) at eval.c:1425 #34 0x000000000047b386 in call_cfunc (func=0x4262e0 <rb_io_s_open>, recv=182903948584, len=6, argc=15692, argv=0x3d4c) at call_cfunc.h:24 #35 0x000000000047963a in th_eval (th=0x66ba90, initial=15692) at vm.inc:2023 #36 0x000000000047aff3 in th_eval_body (th=0x66ba90) at vm.c:1129 #37 0x000000000047c4c9 in yarv_load (file=0x2a96087070 "\a") at yarv.h:43 #38 0x000000000048fdd1 in rb_load (fname=182905807424, wrap=0) at eval_load.c:141 #39 0x000000000048ff23 in rb_f_load (argc=15692, argv=0x3d4c) at eval_load.c:198 #40 0x000000000047b386 in call_cfunc (func=0x48fef0 <rb_f_load>, recv=182904026184, len=6, argc=15692, argv=0x3d4c) at call_cfunc.h:24 #41 0x000000000047963a in th_eval (th=0x66ba90, initial=15692) at vm.inc:2023 #42 0x000000000047aff3 in th_eval_body (th=0x66ba90) at vm.c:1129 #43 0x000000000047763d in th_invoke_yield (th=0x66ba90, argc=1, argv=0x7fbfffe540) at vm.c:579 #44 0x0000000000415903 in rb_yield_0 (val=182905889424, self=15692, klass=6, flags=-1, avalue=15692) at yarv.h:49 #45 0x000000000048043e in rb_ary_each (ary=182905883784) at array.c:1149 #46 0x000000000047b38f in call_cfunc (func=0x4803c0 <rb_ary_each>, recv=182905883784, len=6, argc=15692, argv=0x3d4c) at call_cfunc.h:27 #47 0x000000000047963a in th_eval (th=0x66ba90, initial=15692) at vm.inc:2023 #48 0x000000000047aff3 in th_eval_body (th=0x66ba90) at vm.c:1129 #49 0x000000000041451a in ruby_exec_internal () at eval.c:268 #50 0x0000000000414543 in ruby_exec () at eval.c:280 #51 0x000000000041457d in ruby_run () at eval.c:297 #52 0x0000000000411629 in main (argc=10, argv=0x7fbffff468, envp=0x6) at main.c:36
GC の途中かあ。 本家みたく、ひたすら GC しまくるやつを入れてみるべきかな。
(11:03)
本当は TwoTailって名前にしようかと思ったんだよ。 その前は TwinTail を考えたんだけど、 「ついんて〜る」って 2ch ブラウザがあるから。
(12:58)
Copyright (c) 2002-2007 青木峰郎 / Minero Aoki. All rights reserved.
むぅ。iseq_mark っぽいので printf デバッグ希望。