From: Tadashi Saito Date: 2007-02-11T15:55:30+09:00 Subject: Re: [ ruby-Bugs-8541 ] coredump when invoking Kernel:syscall Hello all, On Sat, 10 Feb 2007 08:30:41 +0900 Sam Roberts wrote: > If you provide more arguments than rb_f_syscall can use on your system, > then it won't call syscall (and it will overwrite an array on the > stack). I see. It must be a Ruby side's (and typical) bug. I fixed up the patch so that the checking is performed only once. How about for upcoming release? > knu-san and Urabe-san Index: io.c =================================================================== --- io.c (revision 11701) +++ io.c (working copy) @@ -5046,6 +5046,8 @@ rb_secure(2); if (argc == 0) rb_raise(rb_eArgError, "too few arguments for syscall"); + if (argc > sizeof(arg)/sizeof(arg[0])) + rb_raise(rb_eArgError, "too many arguments for syscall"); arg[0] = NUM2LONG(argv[0]); argv++; while (items--) { VALUE v = rb_check_string_type(*argv); -- Tadashi Saito