Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3AA93C60.11BB7B2D@tensilica.com> Date: Fri, 09 Mar 2001 12:26:08 -0800 From: Sterling Augustine X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: 1.1.8 dllwrap stl static list destructors crash Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Below is a set of sources for a simple program and dll. The dll contains a static stl list. No operations are ever performed on this list, except that it is constructed and destructed. When the the program exits, the list's destructor is called, and it crashes (I'm fairly hazy on stl internals, but my guess is that the list isn't constructed properly). This crash doesn't occur if the list isn't inside a dll. To see this in operation, extract the files, and then type make. dllcheck (which has the list in a dll) will crash. Any ideas on what's wrong or how to fix it? Files follow. Thanks, Sterling sterling AT tensilica DOT com >>>>>>>>>>>>>>>> #Makefile to see an stl list inside a dll crash on deconstruction dllcheck: bar.dll foo.o Makefile g++ -v -o dllcheck bar.dll foo.o foo.o: foo.cxx g++ -MD -g -c foo.cxx -o foo.o bar.o: bar.cxx g++ -MD -g -c bar.cxx -o bar.o bar.dll: bar.o dllwrap --driver-name /usr/bin/g++.exe -target=i386-cygwin32 --export-all bar.o --dllname bar.dll clean: rm -f bar.dll bar.o foo.o *.exe *~ *.d >>>>>>>>>>>>>>>>>>>> /* bar.cxx: the dll file. alist's deconstruction will cause a segfault */ #include list alist; __declspec(dllexport) void do_nothing() { } >>>>>>>>>>>>>>>>>> /* foo.cxx: the main program. Note that it doesn't refer to the list. */ extern __declspec(dllimport) void do_nothing(void); int main() { do_nothing(); } -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple