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 Message-ID: <42EFCCAB.7010803@familiehaase.de> Date: Tue, 02 Aug 2005 21:42:35 +0200 From: "Gerrit P. Haase" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.11) Gecko/20050728 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: bug report: abort in g++ 3.4.4 generated DLL & client References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Dave Korn wrote: > ----Original Message---- > >>From: Gerrit P. Haase >>Sent: 02 August 2005 20:16 > > >>Gerrit P. Haase wrote: >> >> >>>I get the same result when running a binary compiled with gcc-3.4.4 / >>>binutils-20050608-2 / cygwin-1.5.17, here it is running fine, running >>>the idebntical executable at another box with cygwin-1.5.18 gives me >>>the crash. >> >>I should mention that it works also the other way round, the biary >>compiled wit gcc-3.4.4 / binutils-20050610-1 / cygwin-1.5.18 is crashing >>but when running it on another machine with cygwin-1.5.17 the identical >>binary works ok. >> > > > I think it's a problem in pthread/mutex stuff. It's quite likely that it > only shows with more recent gcc because of changes to libstdc++ between > those two versions: I remember seeing quite a lot of work going on there to > do with atomicity, locking and threadsafety. I have not tried to build it with gcc-3.3.3, could someone with this version handy build an executable and send it to me, please? Source file 1: ==> testdll.cpp <== #include std::string test() { return std::string(); } Source file 2: ==> main.cpp <== #include std::string test(); int main() { puts("hello"); test(); puts("goodbye"); return 0; } Commands I used: $ g++ -Wall -c testdll.cpp $ g++ -Wall -c main.cpp $ g++ -shared -o mydll.dll -Wl,--out-implib=libmydll.dll.a \ -Wl,--export-all-symbols -Wl,--enable-auto-import \ -Wl,--whole-archive dll.o -Wl,--no-whole-archive Creating library file: libmydll.dll.a $ g++ -o mymain main.o mydll.dll Gerrit -- =^..^= -- 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/