Just forwarding to the redmine so that it recognizes the new issue.

---------- Forwarded message ----------
From: Christoph Kappel <unexist / dorfelite.net>
Date: 2009/10/9
Subject: [ruby-core:26012] Segfaults after multiple call of ruby_node_run
To: ruby-core <ruby-core / ruby-lang.org>



Hello list,

I am just trying to solve the embedding issue (ruby-core:25927) and
tried to make a small testing program to narrow it down.
Actually I stumbled over another thing which I don't understand, why
does this program segtaults in the second run of the loop:

It's started like this: ./test test.rb

test.c
---------
#include <stdio.h>
#include <unistd.h>
#include <ruby.h>

RUBY_GLOBAL_SETUP

int
main(int argc,
=A0char *argv[])
{
=A0void *node =3D NULL;

=A0if(2 !=3D argc)
=A0 =A0{
=A0 =A0 =A0fprintf(stderr, "Usage: %s <FILE>\n", argv[0]);
=A0 =A0 =A0exit(1);
=A0 =A0}

=A0ruby_sysinit(&argc, &argv);
=A0RUBY_INIT_STACK;
=A0ruby_init();

=A0node =3D ruby_options(argc, argv);

=A0while(1)
=A0 =A0{
=A0 =A0 =A0ruby_run_node(node);

=A0 =A0 =A0sleep(1);
=A0 =A0}

=A0rb_exit(0);

=A0return(0);
}

test.rb
-------------
puts "foobar"


--=20
Yuki Sonoda (Yugui)
yugui / yugui.jp
http://yugui.jp