guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rogue Pointer


From: Dale P. Smith
Subject: Re: Rogue Pointer
Date: Wed, 16 May 2001 14:42:13 -0400

Dirk Herrmann wrote:
> 
> On Mon, 14 May 2001, Dale P. Smith wrote:
> 
> > I'm get a "Error in scm_gc_mark during GC: rogue pointer in heap" when
> > the first gc happens in cvs guile.  This is in an Apache module.
> >
> > What is a "rogue pointer"?  I image it's a pointer into gc controlled
> > memory from somewhere in the heap. Or is it the other way around, a
> > pointer to memory that's not gc controlled?
> 
> It indicatest that the gc detected a pointer into non-gc controlled space
> at a place where a pointer into gc controlled space was expected.  It is a
> severe error.  Unfortunately, it is difficult to determine the place where
> the actual error occurs - the gc only tells you that some time between now
> and the previous gc something went wrong.  Typically, it is some smob code
> that is responsible for the problem.


Whew!  I finally found it.  I was using SCM_CONST_LONG, which is now
deprecated, and changed the code to use SCM_VARIABLE_INIT's instead. 
But I was still initializing with C values and not converting them to
SCM's. Oops. One of the values was M_GET, which is 0.  The "rouge
pointer" was NULL.  Hmmmm.  It's working now.

Should SCM_CONST_LONG really be deprecated?  It looks like it is just on
the wrong side of the "#if (SCM_DEBUG_DEPRECATED == 0)" in snarf.h.

Thanks again,
  -Dale

-- 
Dale P. Smith
Treasurer, Cleveland Linux Users Group http://cleveland.lug.net
Senior Systems Consultant, Altus Technologies Corporation
address@hidden
440-746-9000 x309



reply via email to

[Prev in Thread] Current Thread [Next in Thread]