Gauche > Archives > 2012/09/05

2012/09/05 01:36:44 UTC(び)
#
こちらに
#
for d in gauche util srfi threads uvector charconv binary net termios fcntl file sxml syslog dbm mt-random bcrypt digest vport text zlib sparse peg windows tls; do (cd $d; make default); done
../../src/gosh -ftest ../../src/precomp -e -P -o gauche--collection ../../libsrc/gauche/collection.scm
make[2]: *** [gauche--collection.c] Segmentation fault: 11
../../src/gosh -ftest ../../src/precomp -e -P -o util--match ../../libsrc/util/match.scm
make[2]: *** [util--match.c] Segmentation fault: 11
../../src/gosh -ftest ../../src/precomp -e -i srfi-1.sci ../../libsrc/srfi-1.scm
make[2]: *** [srfi-1.c] Segmentation fault: 11
cc -DHAVE_CONFIG_H -I. -I. -I../../src -I../../src -I../../gc/include -I/usr/pkg/include -I/usr/local/include  -I/usr/pkg/include -I/usr/local/include -no-cpp-precomp  -g -O2 -no-cpp-precomp -fPIC -fno-common   -o threads.o -c threads.c
cc -DHAVE_CONFIG_H -I. -I. -I../../src -I../../src -I../../gc/include -I/usr/pkg/include -I/usr/local/include  -I/usr/pkg/include -I/usr/local/include -no-cpp-precomp  -g -O2 -no-cpp-precomp -fPIC -fno-common   -o mutex.o -c mutex.c
../../src/gosh -ftest ../../src/precomp -e -P -o gauche--threads ./threads.scm
make[2]: *** [gauche--threads.c] Segmentation fault: 11
rm -rf uvector.c
../../src/gosh -ftest ./uvgen.scm ./uvector.c.tmpl
make[2]: *** [uvector.c] Segmentation fault: 11
#
こんな感じですね。
2012/09/05 01:46:28 UTCshiro
#
srcの下で ./gosh -ftest -q でも死にます?
2012/09/05 01:47:43 UTC(び)
#
% ./gosh -ftest -q
zsh: segmentation fault  ./gosh -ftest -q
#
死にますね。gdbで追ってみましょうか。
#
% gdb gosh        
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) set args -ftest -q
(gdb) run
Starting program: /Users/bizenn/hack/gauche/Gauche/src/gosh -ftest -q
Reading symbols for shared libraries ++............................. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5f3ffa88
0x00000001000ecb06 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x7fff5fbfaaf0 "") at misc.c:290
290	    BZERO(dummy, CLEAR_SIZE*sizeof(word));
(gdb)
#
gcの中みたいですね。
2012/09/05 01:50:32 UTCshiro
#
そこはわざとかも。スタック領域がどこまでか調べるためにわざと書き込んでSEGVを検出してるところが初期化ルーチンにある。
2012/09/05 01:50:51 UTC(び)
#
ちなみにbtすると、0x00000001000ecb16 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x6a8 <Address 0x6a8 out of bounds>) at misc.c:292 が延々と出続ける。
#
なるほど
#
初期化ルーチンでSEGV検出してるってことは、SIGSEGVをキャッチしてるはずができてないってことになるのかな?
2012/09/05 01:52:25 UTCshiro
#
もしくは初期化ルーチンの後でSEGVってるか。gdbはプログラムがSEGVハンドラインストールしてても横取りしちゃうんじゃなかったかな。
2012/09/05 01:52:53 UTC(び)
#
なるほど
2012/09/05 01:53:01 UTCshiro
#
core吐かせてスタック見て、そこから逆算してブレークポイントかける方がいいかも。
2012/09/05 01:53:19 UTC(び)
#
昼休みにでもやってみます
2012/09/05 01:53:29 UTCshiro
#
ありがとうございます。
2012/09/05 02:03:39 UTC(び)
#
(gdb) bt
#0  0x00000001000ecb06 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x7fff5fbfaaf0 "") at misc.c:290
#1  0x00000001000ecb16 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x6a8 <Address 0x6a8 out of bounds>) at misc.c:292
#2  0x00000001000ecb16 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x6a8 <Address 0x6a8 out of bounds>) at misc.c:292
[中略]
#4762 0x00000001000ecb16 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x6a8 <Address 0x6a8 out of bounds>) at misc.c:292
#4763 0x00000001000ecb16 in GC_clear_stack_inner (arg=0x1005f9fe0, limit=0x6a8 <Address 0x6a8 out of bounds>) at misc.c:292
#4764 0x00000001000ecb97 in GC_clear_stack (arg=0x1005f9fe0) at misc.c:338
#4765 0x000000010006daa4 in make_bignum [inlined] () at /Users/bizenn/hack/gauche/Gauche/src/bignum.c:117
#4766 0x000000010006daa4 in Scm_MakeBignumFromSI (val=<value temporarily unavailable, due to optimizations>) at bignum.c:146
#4767 0x0000000100066acd in Scm_Ash (x=0x713ae47e6c658b7, cnt=63) at number.c:3017
#4768 0x000000010006c69c in Scm__InitNumber () at number.c:4019
#4769 0x0000000100006e0e in Scm_Init (signature=<value temporarily unavailable, due to optimizations>) at core.c:152
#4770 0x00000001000015fb in sig_setup [inlined] () at /Users/bizenn/hack/gauche/Gauche/src/main.c:411
Current language:  auto; currently minimal
(gdb)
#
中略部分は同じものが続いています。
2012/09/05 02:06:15 UTCshiro
#
ふむ。初期化ルーチンですね。ということはやっぱりgcの初期化でしくじってるっぽい。ちと
#
gcのML調べてみます。
2012/09/05 02:17:32 UTCshiro
#
これっぽいな http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/5286
#
最適化ルーチンが賢すぎるらしい。代替案が示されてるがパッチはもう入ってるのかな?
2012/09/05 09:59:17 UTCg000001
#
こんにちは、
#
ILC 2012 京都で参加の呼び掛けが出ています
#
==========================================================

INTERNATIONAL LISP CONFERENCE 2012: Call for Participation

==========================================================

The Association of Lisp Users (ALU) is pleased to announce ILC 2012, to be
held in Kyoto, Japan October 21st-24th. Please make a note of the following
important dates and events.

0. Conference Home Page:
   http://international-lisp-conference.org

1. Conference Schedule:
   http://international-lisp-conference.org/2012/schedule.html.

2. Speakers:
   http://international-lisp-conference.org/2012/speakers.html

3. Registration:
   http://international-lisp-conference.org/2012/registration.html

4. Please reserve your hotels early, as availability is limited this time of the year in Kyoto:
   http://international-lisp-conference.org/2012/paypal-online.html#sec-2

5. We are proud to announce  following distinguished speakers:
  - Mark Battyani: Successful Lisp Entrepreneur
  - Christian Queinnec: Author of Lisp In Small Pieces
  - Ikuo Takeuchi:  Renown Japanese Inventor of the TAK-function
  - Eiiti Wada: Famous Japanese Lisp Guru -- Designer of Happy Hacking Keyboard
#
奮ってご参加下さい!
2012/09/05 14:17:45 UTC(び)
#
奢ってに空目。目が死んでるな...