bug-guile
[Top][All Lists]
Advanced

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

Re: guile-2.0.0 fails to build without threads


From: Ludovic Courtès
Subject: Re: guile-2.0.0 fails to build without threads
Date: Wed, 04 May 2011 14:19:17 +0200
User-agent: Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux)

Hi Marijn,

Marijn <address@hidden> writes:

> On 04/28/11 17:09, Ludovic Courtès wrote:
>> Andy Wingo <address@hidden> writes:
>>
>>> On Thu 28 Apr 2011 15:08, address@hidden (Ludovic Courtès) writes:
>>>
>>>>>       /* Sanity check.  */
>>>>>       if (!GC_is_visible (&scm_protects))
>>>>>         abort ();
>>>
>>> Is this even the right check to make?
>>
>> Yes: the goal is to make sure that the ‘scm_protect’ variable itself is
>> a GC root.
>>
>> Actually, Marijn: can you try “GC_DUMP_REGULARLY=1 ./meta/guile -c 0”,
>> and check what’s under “Static roots”?

More precisely:

--8<---------------cut here---------------start------------->8---
$ ./meta/gdb-uninstalled-guile
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/ludo/src/guile/libguile/.libs/guile...done.
(gdb) set environment GC_DUMP_REGULARLY "1"
(gdb) b main
Breakpoint 1 at 0x400ab0: file guile.c, line 69.
(gdb) r -c 0
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /home/ludo/src/guile/libguile/.libs/guile -c 0
[Thread debugging using libthread_db enabled]

Breakpoint 1, main (argc=3, argv=0x7fffffffce88) at guile.c:69
69      {
(gdb) p &scm_protects
$2 = (SCM *) 0x7ffff7dd7788
(gdb) c
Continuing.
***Static roots:
Total size: 0

***Heap sections:
Total heap size: 65536
Section 0 from 0x663000 to 0x673000 0/16 blacklisted

***Free blocks:
Free list 16 (total size 65536):
        0x663000 size 65536 not black listed
Total of 65536 bytes on free list

***Blocks in use:
(kind(0=ptrfree,1=normal,2=unc.):size_in_bytes, #_marks_set)

blocks = 0, bytes = 0
***Static roots:
>From 0x601000 to 0x601360 (temporary)
>From 0x7ffff7db0000 to 0x7ffff7ddde00 (temporary)  ;; ← here!
>From 0x7ffff7a1b000 to 0x7ffff7a5e6e0 (temporary)
>From 0x7ffff77ee000 to 0x7ffff77f23b0 (temporary)
>From 0x7ffff75d5000 to 0x7ffff75d5108 (temporary)
>From 0x7ffff73d1000 to 0x7ffff73d18e0 (temporary)
>From 0x7ffff71c5d58 to 0x7ffff71c9f08 (temporary)
>From 0x7ffff6eb2a08 to 0x7ffff6eb3f60 (temporary)
>From 0x7ffff6c5f450 to 0x7ffff6c5f988 (temporary)
>From 0x7ffff6a28000 to 0x7ffff6a561c0 (temporary)
>From 0x7ffff681f000 to 0x7ffff681f0e8 (temporary)
>From 0x7ffff6598000 to 0x7ffff659dbe8 (temporary)
>From 0x7ffff7ffd000 to 0x7ffff7ffe188 (temporary)
Total size: 725552
--8<---------------cut here---------------end--------------->8---

Above ‘scm_protects’ clearly appears as a root.  Can you check this?

How was libgc compiled?  Does its ‘make check’ pass?
What does ‘env | grep ^GC’ say?

Can you try this program with the same libgc:

--8<---------------cut here---------------start------------->8---
#include <gc/gc.h>

int foo[123];

int
main (int argc, char *argv[])
{
  GC_INIT ();
  GC_is_visible (&foo);
  return 0;
}
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.



reply via email to

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