delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=opTzlffxZWHlN7xShAOgp9ckrCtS4+ZgCerWMimkZYclH6ewqJ3ii | |
xXaqtxSyaKUdG71IFEGNd3whk1irBMTcNnZ2Lv3GUD7xV5RLOQnEdb0eriJ2Xq/6 | |
S5i+kceXrclIJ/zBtjUEGKH+oEUc9qzL0iNkl44+JlVgIHpVBD0nZI= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=ycbh1F6Y5CNbSFijXS8GULdxXC8=; b=oVztpimFGD5YC2BaGda+3BRaWyqP | |
nWTgOI2zxRUQrTIRx7uAICYDaF4ky+MQEoU8mUyApCxCEvP5WrFUruaGD/rbYIrm | |
U7UdnAx/wmHL4OPQr2tWlyJwZ1LN8F6AT8LgjrImDe3uYeHsx5bUbqMB2O00vsac | |
Tl1g57PcDeBP08o= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-4.3 required=5.0 tests=AWL,BAYES_50,URI_NOVOWEL autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 25 Mar 2015 10:04:53 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: static vs. shared linking |
Message-ID: | <20150325090453.GB3017@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <5510A9AB DOT 7020607 AT tiscali DOT co DOT uk> <5511AF73 DOT 9070607 AT tiscali DOT co DOT uk> |
MIME-Version: | 1.0 |
In-Reply-To: | <5511AF73.9070607@tiscali.co.uk> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--HKOZ/JADkehwFk9I Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mar 24 18:39, David Stacey wrote: > On 24/03/2015 00:02, David Stacey wrote: > >I've been having difficulty building poco-1.6.0 for Cygwin for some > >time. I've managed to produce a test case that shows the problem: > > > >https://dl.dropboxusercontent.com/u/119453582/Cygwin/crashtest.tar.xz > > > >This archive contains source files that produce a very simple library. > >When linked statically, the code works fine. However, when linked as a > >shared DLL, the test crashes with a core dump. The behaviour is > >identical on x86 and x86_64 architectures. > > > >Have I made a stupid error in the compilation of the shared case, or is > >something more interesting going on? >=20 > I don't know if anyone has managed to look at this. I haven't had a deluge > of e-mails telling me that I've done something silly (which is a shame, > because then I could fix it quickly and move on). For the sake of a straw= to > clutch at, I tried compiling with clang++ rather than g++, and got the sa= me > result: >=20 > $ ./go.sh > Running test (static link)... > Done. >=20 > Running test (shared link)... > ./go.sh: line 19: 3744 Aborted (core dumped) > ./shared_test > Done. >=20 > Any help or hints would be greatly appreciated. For a start, you should contemplate to build your test with -g to allow debugging. Then you can run the testcase under GDB and get (more or less) useful output. The crash occurs in a delete call, afaics. If you install the cygwin-debuginfo package, addr2line returns something like this as the call stack (non-required path components removed): [...]/cygwin/exceptions.cc:1247 [...]/cygwin/exceptions.cc:1501 [...]/cygwin/sigproc.cc:717 [...]/cygwin/signal.cc:252 [...]/cygwin/signal.cc:303 [...]/cygwin/signal.cc:313 [...]/cygwin/signal.cc:289 [...]/cygwin/signal.cc:375 Everything up to here you can ignore, they are the result of the abort() call in free(), which occurs here: [...]/cygwin/malloc.cc:4779 [...]/cygwin/malloc_wrapper.cc:47 [...]/cygwin/sigfe.s:43 [...]/cygwin/libstdcxx_wrapper.cc:69 That's the actual call to the delete method. /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/ext/new_allocator.h:110 /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/basic_string.tcc:449 /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/basic_string.h:249 /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/include/c++/bits/basic_string.tcc:512 And this is where it comes from. It's a call to void basic_string<_CharT, _Traits, _Alloc>::reserve(size_type __res) But, really, I have no idea how this stuff is correlated. I'm not a user of libstdc++. What's noticable is the fact that the crash does *not* occur because the shared lib is unloaded or something like that. However, building with -g allows you to step through the code and see what happens, maybe that gives a clue. HTH, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --HKOZ/JADkehwFk9I Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVEno1AAoJEPU2Bp2uRE+ggS8P/AwMnR5ll8XOUkl17oZpB25A Z3Ynr4Fvn2Ovf0C3vetYfEqAYpkP/HgHpejULGO93OCRnkCdbk9uqSEeu1jA8Kau hnUZktaOkCjA54F29qpaIfnLz32BmPVTbWFRsm27CSYcynSCPnYYho1V4bZfULUH gL0EsjunudzgYlcY0MbGUrwlqJXDvWK5ADDVyi1qKDy73Ob2Rui4D+6d8s8QApSI AYb4Gf4pl2zBoa/bUXvmXXjeAYepR/PMqQ5w7FuU/kbTieELElfHEa22MOGJZkFl Z6IlCE4IHg5az8hiFQdjEmLpgJzGWwAqNHiIxWAt8389W2UB83KIsBbjbb+diusJ v3rQLP3dnHB84ynXtYh9KlKeMw1coovtGAJSQu91m18Kgu7zKNlTEmtp27Yqvf42 VQs/OBIZ9k+FCd7rm5DnU++MuPFPTHU7Uqaz10a2BVYJjWLHSbGPGv4TooYcT0ci 9Fb/XE5paKyupMAv5sIOUI6Z2X1AsSKJ5G5ydqU/SXpHHakIzHw9SftfUFz/j38r l5eUqq3fUI6XbKTvZ553VgMl+LcWdV76JGETSwRzXlk0SYzQ3Fwqpmol2/pPRQDS Q2Ix0SIOtRN6p78di1cY02RGwwvcikAr2q+w7bQIUfDVz6WGOJUQeZOZfibz0yRC nNW0B/m3kM0IotZIO8T0 =fm/E -----END PGP SIGNATURE----- --HKOZ/JADkehwFk9I--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |