Advertisements

|I have a pure C function, which may be called arbitrary
|sequential times. If I call any rb_* function inside, including
|the simple rb_warn(), I get:
|
|BUG] rb_gc_mark(): unknown data type 0x28(0x89965b0) non object
|ruby 1.8.0 (2003-08-04) [i586-linux]
|
|The error occures after a lot of calls; it reminds me the
|behaviour of a stack overflow, or something.

I will try, but it is a little bit hard because the C func is called
from a C++ method deeply inside a complex inheritance tree.

Things that I can verify now are:

(a) The C func is called with no problem 8000 times.
(b) The C func is called for 3000+ and segfaults if I put a
simple rb_warn() inside. Ruby 1.8.0
(c) The C func is called for 6000+ and segfaults if I put a
simple rb_warn() inside. Ruby 1.8.1 preview 3.

Regards,
--
University of Athens I bet the human brain
Physics Department is a kludge --Marvin Minsky

The error ruby reports is on an address of a Foo created pointer.
If I remove the rb_iv_set() call, ruby executes correctly. But, I
have to keep the pointer somewhere in order to execute methods of
the specific class.

Any ideas?

Regards,
--
University of Athens I bet the human brain
Physics Department is a kludge --Marvin Minsky

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!