X-Spam-Check-By: sourceware.org Date: Fri, 7 Apr 2006 21:42:57 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Steven Brown cc: cygwin AT cygwin DOT com Subject: Re: Reproducible, simple bug; g++ toolchain / std::string bug? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Fri, 7 Apr 2006, Steven Brown wrote: > I've run into what appears to be a bug in the g++ toolchain or the STL's > std::string using the latest Cygwin dist (up to date as of right now). > Minimal test case attached. > > If my shared library does a callback to a function returning > std::string, and only if the std::string is empty, I get an abort when > that std::string is destroyed. > > The attached files will show this bug - run make and the xxx-cygwin.exe > that's produced and it will abort. The same will happen if you use > libtool to build it the right way - the autoconf/ dir in the bug's > repository[1] can be used for that if you want to see it (copy it into > the main dir, ./autogen.sh && make). > > Any ideas as to where the problem lies or how to further identify it? Sure. This has been discussed on this list a few times this year -- see the list archives. A Google search for "cygwin dll std:string" should show some mathces (including a reference to the GCC bug report[*] for this, which, AFAICS, contains a patch that you can test). Igor [*] -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- 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/