From: "H.Yamamoto" Date: 2004-08-20T00:27:49+09:00 Subject: [ruby-dev:24135] Re: ruby/tk crashes on bcc32 山本です。試行錯誤の結果、これで落ちなくなりました。 Index: tcltklib.c =================================================================== RCS file: /var/cvs/src/ruby/ext/tcltklib/tcltklib.c,v retrieving revision 1.57 diff -u -w -b -p -r1.57 tcltklib.c --- tcltklib.c 30 Jul 2004 07:13:53 -0000 1.57 +++ tcltklib.c 19 Aug 2004 15:19:00 -0000 @@ -95,17 +95,7 @@ static ID ID_inspect; static VALUE ip_invoke_real _((int, VALUE*, VALUE)); static VALUE ip_invoke _((int, VALUE*, VALUE)); -/* from tkAppInit.c */ - -#if !defined __MINGW32__ -/* - * The following variable is a special hack that is needed in order for - * Sun shared libraries to be used for Tcl. - */ - -extern int matherr(); -int *tclDummyMathPtr = (int *) matherr; -#endif +#define free(p) xfree(p) /*---- module TclTkLib ----*/ void ruby_xfree(void *x) 以前 malloc/calloc/realloc して free していないポインタ x を開放します。 ruby のシグナル機構とコンフリクトしません。 ruby のシグナル機構がわかってないのですが、これが問題だとすると ALLOC(N) + free しているところは全て問題ありということでしょうか?