Bug 9025

Summary: Crash on dbus_threads_init_default
Product: dbus Reporter: Etienne Vaillant <evaillant>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: major    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Etienne Vaillant 2006-11-14 07:49:41 UTC
I'm a very simple program and it crash (with an assert) when i run it.

Program :

#include <stdio.h>
#include <dbus/dbus.h>

int main(void)
{
 //
 //
 dbus_threads_init_default();

 return 0;
}

with :
 - g++ 4.1.2
 - dbus version 1.0.0


Run :
$ ./run
10501: assertion failed "(functions->mask & ~DBUS_THREAD_FUNCTIONS_ALL_MASK) ==
0" file "dbus-threads.c" line 606 function dbus_threads_init
...
..
.

I think, I found the error : the value of DBUS_THREAD_FUNCTIONS_ALL_MASK on file
dbus/dbus-threads.h. Currently its value is (1 << 13) - 1 and I think, it is
wrong and it woud be (1 << 14) - 1.
Comment 1 John (J5) Palmieri 2006-11-14 10:35:13 UTC
changing the threads test to use the default threads instead of the debug
threads as this is a more realworld test.
Comment 2 John (J5) Palmieri 2006-11-14 10:57:38 UTC
fixed with testcase.  Commited to HEAD and DBUS_1_0
Comment 3 Havoc Pennington 2006-11-14 12:57:40 UTC
The only trick there is that the debug threads stuff barfs on recursive thread 
locking, and I was trying to keep things working without recursive locks...
I think it might be good to have a more thread-specific little test program, 
too, just verifying the basic behavior of the thread primitives.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.