[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make_services dumps core
From: |
David Ayers |
Subject: |
Re: make_services dumps core |
Date: |
Thu, 26 Jan 2006 10:01:00 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20051002) |
Chris B. Vetter schrieb:
> anyone also experiencing core dumps of make_services when installing
> the latest CVS versions of -gui? I first noticed the problem with
> yesterday's checkout. Same problem today.
>
> The interesting thing is that I added a simple fprintf() as the very
> first line (even before variable definitions) in main(), and core is
> dumped before fprintf() even gets called...
>
> The system hasn't been changed, no required or optional dependencies
> have been updated within the last few days and -gui compiled fine with
> Friday's checkout. Still don't have internet at home so I dunno about
> the weekend versions.
>
> Using gdb, all I can figure out is that it apparently receives a
> SIGSEGV when calling pthread_key_create(). The only reference to that
> call is in base/Source/thr-pthread.m
>
> Any ideas what's happening?
Hello Chris,
I assume this is the libpthread in conjunction with libobjc issue:
http://savannah.gnu.org/bugs/?func=detailitem&item_id=13800
The problem is that some (i.g. FreeBSD's) implementations of libpthread
rely on a constructor function:
void _thread_init_hack(void) __attribute__ ((constructor));
void
_thread_init_hack(void)
{
_libpthread_init(NULL);
}
to have the internal structures of libpthread initialzed instead of
guardinging the public api (like pthread_key_create())with:
if (_thr_initial == NULL)
_libpthread_init(NULL);
libobjc also uses a constructor function to setup the threading
environment and happens to call pthread_key_create() first. Now whether
the libpthread constructor is called before the libobjc constructur is
(also?) dependent on the order -l link directives. I'm not aware of any
recent changes in -make though, so it might also be dependent on the
phase of the moon ;-).
The bug is in the libpthread implementation that should guard it's
public API. It seems there was a bug filed for this for FreeBSD but I'm
not sure what the state of that is.
Cheers,
David