This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: bug report: abort in g++ 3.4.4 generated DLL & client
- From: "Gerrit P. Haase" <gerrit at familiehaase dot de>
- To: cygwin at cygwin dot com
- Date: Tue, 02 Aug 2005 21:42:35 +0200
- Subject: Re: bug report: abort in g++ 3.4.4 generated DLL & client
- References: <SERRANONN79xavjrRZ1000000df@SERRANO.CAM.ARTIMI.COM>
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 <string>
std::string test() { return std::string(); }
Source file 2: ==> main.cpp <==
#include <string>
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/