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: Mon, 14 May 2001 16:32:33 -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.

Good!  Probably something in my code I need to fix.

> If you have difficulties to figure out what goes wrong, the following may
> help you:
> 
>   make clean
>   make "CFLAGS=-g -DSCM_DEBUG_CELL_ACCESSES=1"
>   make "CFLAGS=-g -DSCM_DEBUG_CELL_ACCESSES=1" install

Here what I built guile with:

./autogen.sh &&
./configure --disable-deprecated --with-gnu-ld --disable-static
--enable-debug-freelist &&
make clean &&
make "CFLAGS=-g -DSCM_DEBUG_CELL_ACCESSES=1" &&
sudo make "CFLAGS=-g -DSCM_DEBUG_CELL_ACCESSES=1" install

The error I get from apache.dbg (apache compiled with debug symbols) is
this:

(gdb) r -X
Starting program: /usr/sbin/apache.dbg -X

Program received signal SIGABRT, Aborted.
0x400c8921 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x400c8921 in kill () from /lib/libc.so.6
#1  0x400c8608 in raise () from /lib/libc.so.6
#2  0x400c9c61 in abort () from /lib/libc.so.6
#3  0x40310399 in scm_assert_cell_valid (cell=135022608) at gc.c:144
#4  0x4034344e in scm_cons (x=9588, y=10612) at pairs.c:66
#5  0x40315736 in scm_init_storage () at gc.c:2644
#6  0x4032b344 in scm_init_guile_1 (base=0xbffffa50) at init.c:474
#7  0x4032b2c3 in scm_init_guile () at init.c:448
#8  0x402c4062 in mg_init () from /usr/lib/apache/1.3/mod_guile.so
#9  0x80556ff in ap_init_modules (p=0x8099e3c, s=0x8099e64)
    at http_config.c:1568
#10 0x805d2da in main (argc=2, argv=0xbffffa54) at http_main.c:4931

And this is what I get just running guile:

(gdb) r
Starting program: /usr/local/bin/guile
scm_assert_cell_valid: Accessing free cell: 804a010

Program received signal SIGABRT, Aborted.
0x40164921 in kill () from /lib/libc.so.6
(gdb) bt
#0  0x40164921 in kill () from /lib/libc.so.6
#1  0x40164608 in raise () from /lib/libc.so.6
#2  0x40165c61 in abort () from /lib/libc.so.6
#3  0x4005d399 in scm_assert_cell_valid (cell=134520848) at gc.c:144
#4  0x4009044e in scm_cons (x=9588, y=10612) at pairs.c:66
#5  0x40062736 in scm_init_storage () at gc.c:2644
#6  0x40078344 in scm_init_guile_1 (base=0xbffff9d8) at init.c:474
#7  0x40078557 in scm_boot_guile_1 (base=0xbffff9d8, closure=0xbffff9c8)
    at init.c:611
#8  0x40078297 in scm_boot_guile (argc=1, argv=0xbffffa64,
    main_func=0x80488c0 <inner_main>, closure=0x0) at init.c:442
#9  0x8048906 in main (argc=1, argv=0xbffffa64) at guile.c:76


The call to scm_cons is "scm_undefineds = scm_cons (SCM_UNDEFINED,
SCM_EOL);"

That is the first call to scm_cons.  Am I seeing weird interactions with
all the options I gave configure?   Guile should still work the way I
have configured and compiled it, right?

-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]