[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Garbage Collection segfault and debug interpreter

Shane Liesegang

9/12/2007 3:20:00 AM

I've got a C++ application that initializes a Ruby interpreter and opens
itself up to scripting via SWIG. Everything is working fine, but I seem
to be getting segfaults on internal garbage collection. That is, if I
call GC.start myself, there isn't a problem, but when it gets called by
the interpreter (via ALLOC_N?), there's a crash.

At least, this is my guess -- I only have a release version of the
library right now, so all my debugger can show me is assembly code. It
looks like the problem is happening around rb_gc_finalize_deferred and
the stack_check call. If I disable garbage collection in script, the
crash never happens.

I'm fairly sure the problem is caused by something stupid that I'm
doing, but because I only have the binary, I can't figure out what it
might be. I looked at the distribution Makefile, but couldn't see any
flags to enable debug symbols. I was wondering if anybody had any
pointers on building the interpreter in debug mode, preferably an OS X
dylib.

(If anybody has any more direct thoughts on what might be causing the
issue, I would, of course, appreciate those as well. :-))
--
Posted via http://www.ruby-....

4 Answers

Nobuyoshi Nakada

9/12/2007 4:53:00 AM

0

Hi,

At Wed, 12 Sep 2007 12:20:16 +0900,
Shane Liesegang wrote in [ruby-talk:268727]:
> I'm fairly sure the problem is caused by something stupid that I'm
> doing, but because I only have the binary, I can't figure out what it
> might be. I looked at the distribution Makefile, but couldn't see any
> flags to enable debug symbols. I was wondering if anybody had any
> pointers on building the interpreter in debug mode, preferably an OS X
> dylib.

configure --cflags='debug options'

--
Nobu Nakada

Tom M

9/13/2007 7:53:00 PM

0

perhaps if you gave us some more information about what you are doing,
esp. source code, then someone may be able to help.

Tom

stercusaccidit

12/15/2010 9:51:00 PM

0

He cleans the house and cooks on a regular basis.
And he really knows what he's talking about when he advises you on wardrobe purchases.
And he knows to use the fan and air freshner in the bathroom.


The Chief Instigator

12/16/2010 12:54:00 AM

0

On Tue, 14 Dec 2010 20:49:39 -0800 (PST), David Johnston <rgorman@telus.net> wrote:
> On Dec 14, 9:39?pm, "J" <jvisi...@live.com> wrote:
> 7) A consistent overreaction to anything concerning gay men -- ?
>> extreme homophobic behavior. If your husband turns almost militantly angry
>> when confronted by someone who is gay, it may indicate that your husband is
>> gay.
>
> Oh really.

He's just trolling, as always. Truth would kill him.

--
Patrick L. "The Chief Instigator" Humphrey (patrick@io.com) Houston, TX
(http://www.io.co...) AA #2237
LAST GAME: Houston 3, Hamilton 1 (December 14)
NEXT GAME: Wednesday, December 15 at Grand Rapids, 6:05