-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ross Bamford wrote:
> Well, I've absolutely no experience embedding ruby (apart from about
> half an hour playing with this just now) so maybe someone more
> experienced with it can help, but I would make a general observations:
> 
> * I don't know what's going on in your relay_ruby_run, or with that
> control transfer setup in general, so I'm assuming nothing strange is
> happening there?

Correct. The relay code works just fine.

> 
> * What ruby_options are being passed? Can you strip that down to the
> bare minimum?

Ultimately, the argv passed to ruby_options() is: ["-w", "test.rb"]

> 
> * If RVPI has an Init_RVPI function then maybe you could compile it
> separately as an extension, and use rb_require to load it, to see if
> your problem still shows up. I had the most success with this (mostly
> because the linking is easier though I guess).

Great idea! I will do this and try to load the RVPI module from
within a normal Ruby process. If this works, then I will know that
the Verilog Simulator I am using is imposing a heap limitation on my
C program and its embedded Ruby interpreter.

> 
> * This:
> 
> 
>>// the Ruby code will now bind any additional callbacks via the
>>VPI infrastructure, and relay back to the verilog so that the
>>simulation can begin
> 
> 
> sounds a likely culprit for stack overflows to me.

Interesting. I hope this is not the case, because this is how I
planned to have Ruby code interact with my Ruby extension.

> Anyway, sorry I can't offer any more specific help. If you still have no
> joy maybe try to extract a short, self-contained example of the problem
> (basically the shortest thing that triggers the error) and I'm sure
> someone here will be more able to help you.

By all means, I thank you very much for considering this problem and
giving such useful advice. :-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFD+CLnmV9O7RYnKMcRAiDZAJ9ij1s0ym/2y+TyB1yjhGTdpqQvnACgo6Lb
YKPf3yghYy2jassqovnFHL4=
=hNk/
-----END PGP SIGNATURE-----