From: MAEDA Shugo Date: 1997-05-29T18:30:24+09:00 Subject: [ruby-list:3042] Re: ruby 1.0-970528 released --Multipart_Thu_May_29_18:30:08_1997-1 Content-Type: text/plain; charset=ISO-2022-JP 前田です。 On Thu, 29 May 97 14:43:48 JST, Yukihiro Matsumoto wrote: |うーん,やはりJedを手元に置かないとダメかなあ. 今、家にもどって試してみたのですが、 On Thu, 29 May 97 11:28:11 JST, Yukihiro Matsumoto wrote: |落ちるような小さいプログラムを作れませんか? 私のところでは以 落とすプログラムを作れました。 メールの最後に添付します。 rb_eval_stringするのをrb_rescueするとまずいみたいです。 char *str = "undefined_method \"test\""; としているところを char *str = "print \"test\""; などとすればちゃんと"hello"と表示されて 正常に終了します。 backtraceはやはり取ることができませんでした。 なお、環境はLinux2.0.28 + gcc2.7.2です。 # rb_rescueで渡すのはVALUEでないといけないのかと思っていた # のですが、そういうわけではないのですね。 前田 修吾 --Multipart_Thu_May_29_18:30:08_1997-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="main.c" Content-Transfer-Encoding: 7bit /************************************************ main.c - $Author: matz $ $Date: 1996/12/25 09:32:03 $ created at: Fri Aug 19 13:19:58 JST 1994 ************************************************/ #ifdef DJGPP unsigned int _stklen = 0x100000; #endif #include "ruby.h" void fail_to_eval(char *str) { printf("failed\n"); } void main(argc, argv, envp) int argc; char **argv, **envp; { char *str = "undefined_method \"test\""; ruby_init(); rb_rescue(rb_eval_string, str, fail_to_eval, str); } --Multipart_Thu_May_29_18:30:08_1997-1--