Trouble squashing Ruby bug

J

Joe Bacigalupa

I'm writing a c++ Ruby extension that seems to be running into some
kind of a memory issue. I'm getting "HEAP: free heap block modified
after it was freed" when I attempt to either allocate a new
array(rb_ary_new) or push onto a ruby array(rb_ary_push) at a certain
point in my program. I can't seem to find any buffer overflows - which
I believe is one cause for such an error. So it leads me to believe
that maybe my "marking" functionality may be flawed. But as far as I
can see I'm handling the marking properly - I mark anything that is not
a fixnum( arrays, other classes, etc). Are there any newbie marking
mistakes anyone knows of that could cause an issue like this?

This problem only happens when my extension uses a decent amount of
memory - so I'm not sure if there is some kind of a Ruby heap limit
that I'm going over.

I'm just curious if anyone has encountered a problem similar to this
that they have overcome? Its been almost a week where I have
essentially been at a standstill with development. I've even got an
evaluation of Insure++ to help me look for memory issues - all to no
avail.

Thanks, Let me know if there is any additional information I can
provide to clarify any details.

Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,209
Messages
2,571,088
Members
47,687
Latest member
IngridXxj

Latest Threads

Top