Hello,

Thank you Ludovico for X-mas this patch !

It seems to be a very good lead to the full debug of this problem and it
will be very appreciated by GNU/Linux aficionados.

Happy New Year OpenWengo !
Jerome

-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Ludovico
Cavedon
Envoyé : vendredi 29 décembre 2006 18:30
À : [email protected]
Objet : [Wengophone-devel] Crash at exit caused my static
objectinitialization/destruction

Hi all,

debugged the crash at exit of wengophone on linux, I found out (thanks to
valgrind!) that the problem was caused by static objects whose
constructor/destructor was called more than once.

Being more specific: if the .o file containing the definition of a static
object
(eg: Logger::logger or String::EOL) is included both in the main code and in
a shared library, the object is still allocated once, but the constructor
and
destructor are called twice on the same object.

This happens only with dynamic libraries, with static libraries there is no
such
problem.
Anyway I am not able to explain such behaviour. Any idea?

Note that that the intel compiler (9.1) has the same behaviour than gcc.
I you want to try, I put a small testcase here:
http://netgroup.polito.it/~cavedon/obj.tgz
(testObj_sh is the executable who is working bad because of this problem).

This is happening for some static objects in wengophone.
I tried to disable the creation of static libraries and the crash
disappeared.
Moreover the the output of valgrind became much cleaner.

I attached a patch for branch 2.0 at ticket
http://dev.openwengo.com/trac/openwengo/trac.cgi/ticket/1199

I will try with trunk/2.1 in the following days.

Happy new year!!!
Ludovico

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to