[Top][All Lists]

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

Re: Latest guile 1.9 segfault in GC

From: Ludovic Courtès
Subject: Re: Latest guile 1.9 segfault in GC
Date: Wed, 18 Aug 2010 16:12:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)


Cedric Cellier <address@hidden> writes:

> But finaly, thanks to libgc's debug message, I got it.
> Actually, libgc overwrite pthread_create (and pthread_sigmask,
> and a few more) to know when a new thread is started.
> But this overloading is done "softly", ie. by a define in a
> C header file.


> So, in conclusion : always include libguile.h in the compilation
> units calling pthread functions.

That’s not entirely true, see Section “Thread Support” at

  All  implementations must intercept  thread creation  and a  few other
  thread-specific calls to allow  enumeration of threads and location of
  thread stacks.  This is current  accomplished with # define's  in gc.h
  (really gc_pthread_redirects.h), or  optionally by using ld's function
  call wrapping mechanism under Linux.

Indeed, here’s what I have on GNU/Linux:

  $ objdump -T ~/soft/lib/|grep pthread_create
  000000000001ef80 g    DF .text  000000000000028e  Base        
  0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 pthread_create

What OS do you use?


reply via email to

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