X-Spam-Check-By: sourceware.org Date: Wed, 22 Mar 2006 23:07:35 +0100 Message-Id: <457131340@web.de> MIME-Version: 1.0 From: Bernhard Loos To: cygwin AT cygwin DOT com Subject: Re: dlopen() bug (new testcase) Content-Type: text/plain; charset=iso-8859-15 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2MM7nGw023935 > -----Ursprüngliche Nachricht----- > Von: skaller userssourceforgenet> > On Wed, 2006-03-22 at 03:35 +0100, Bernhard Loos wrote: > > > If the C++library declares its calls as 'extern "C"' (as it is done in the example), > > AFAIK there shouldn't be any problem. > > Doesn't matter what you think you know -- it's not a permitted thing > to do, you never know what implementors are going to change. Cygwin itself is a C++-library and it works well with C-programs. There is also a C-binding for QT. > Ouch. Hmm. But the code isn't doing anything! > This does look weird -- my system is doing what you're doing > all the time. It was crashing badly for ages until someone pointed > out there was a bug in libstdc++ handling string crossing > DLL boundaries. Since I fixed that the code works fine. > > Perhaps you can try to build it, get Release Candidate 6 > from: Where do you see any string in the testcase? In fact it does something: it creates the static classes cin and cout and a few others. I were able to extract the code causing the crash. If the constructor of lala calls key_init_once(), it crashs just like the example with Otherwise it hangs. It would be really nice, if somebody with some more knowlegde could take a look at this, because I'm unable to debug the program. I get only some strange errormessages and no backtrace. This is a new CrashTest.cc, the other files remains the same: #include pthread_key_t key; void key_init() { pthread_key_create(&key, 0); } void key_init_once() { static pthread_once_t once = PTHREAD_ONCE_INIT; pthread_once(&once, key_init); } class lala { public: lala() { // key_init(); key_init_once(); } }; lala la; extern "C" __declspec(dllexport) void test() { return; } Bernhard ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/