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=vOmdytjKwd5+ac+T85kAbd/mk1VfhGpkt7OwZfKsuU6tdCAkdwW0c Yt3Uw9ZuDfwN3WvMxNJFPt7YdlVjk3UZKVC1LUUDFoWG75xR7uV6/YPvkVrzBK2Q g3ld1MngI+Rgp4e4SPAcWzKF6UYmqo258w3Yktu1AGmSE0SbOne8SU= 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=b0ief7Iu7siuXiBPxwtSkwwpfpQ=; b=bVlR3sADe5WnQai+NrizEXBSp5A8 4DekZWKj1qVaMWxGHHsAJHPctZGLsR6eoymkjN3TkjYATaXKMmFI6iRVJGxJTgQ7 E4ihxwt3aebYCLYs6Z00Ny8lQcIdgFazjxyauGfmswMtD6TxoiBPp1LuXQ4vmzgd 7kBLg3yoEWSi15M= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Tue, 31 Mar 2015 11:05:27 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: static vs. shared linking Message-ID: <20150331090527.GB32403@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> <20150325090453 DOT GB3017 AT calimero DOT vinschen DOT de> <551339E4 DOT 60705 AT tiscali DOT co DOT uk> <20150330105529 DOT GJ29875 AT calimero DOT vinschen DOT de> <5519A0E1 DOT 6020707 AT tiscali DOT co DOT uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3lcZGd9BuhuYXNfi" Content-Disposition: inline In-Reply-To: <5519A0E1.6020707@tiscali.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) --3lcZGd9BuhuYXNfi Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mar 30 20:15, David Stacey wrote: > On 30/03/15 11:55, Corinna Vinschen wrote: > >On Mar 25 22:42, David Stacey wrote: > >>I've never had much joy out of addr2line before, and I'm struggling to > >>recreate what you've done. I've added '-g' to the command line, run 'go= .sh' > >>again. This generates a fresh stackdump file, and then I do: > >>awk '/^[0-9]/{print $2}' shared_test.exe.stackdump | addr2line -f -e > >>shared_test.exe > >>but I just see question marks. Please could you show the exact lines yo= u're > >>using. > >addr2line is a bit dumb and needs help. What I do is to cat the > >stackdump file and look at the addresses. They usually show where > >the stuff comes from: > >[...] >=20 > Thank you for your reply and the explanation. That requires quite a bit of > knowledge before addr2line is usable - no wonder I've never had anything > sensible out of it before! >=20 > Back to the matter in hand - I don't suppose you had thoughts on why my > simple application crashes when linked as shared, but works fine when lin= ked > statically? No, sorry. This may be a c++11 thingy which requires "something" in libstdc++ and Cygwin, but I don't know what that could be. It's especially weird that free() aborts. This points to some malloc/free inconsistency, as if the malloc (or new) call used another implementation of malloc than the aborting free call. It may also be a memory overflow issue but that would show up on other platforms as well. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --3lcZGd9BuhuYXNfi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVGmNXAAoJEPU2Bp2uRE+gP9EP+gNtbJlaCzH+SBd7dNVFAcXy bMjPRxE3kZ9Ww1VTkkaROcxbpa3G1A6k9EcZSiXig1te3BPzmg9L3nWSOC1klxFU gZSntfCdnHI584KCvm6x8BHP8N0AUE+xSxS0uhYFKKfZAcEdK6nex/KXhjJeme97 F5ZxrNxeUGfnLhMHhLoXkEQBBVc6jvs7D7si8UtcZGKzpyMfQ9d3X5uSLoE7EFpY O0sysWF5c7xdMGUdBW3+VmPTdADnyFX3ngQl3Nv9wrCXrfElh4HO6XlVmFrfBVO2 4g9L7SAFPaWLIzSFVvxWX8LaM+rIcFQa2UkKrRcnSvW0A9Nfti7Ndivv74Dv8zPt u1uqdGf1vG/4w5zcE8TwokoJVOIGNhiIUMJw4AaG1H/40fKHAjw+ZtGsgxCv7iXv wGiI/g+4rC0u5GAze30SxE52bDSrgOPcxmemRxMBErHxnDMiappKrfLK1AMyx1bh wvXJc6VbNozXwxhs10GY/g5MM36DtseJb0Dfk4A2SOVqzqFYlbHpoYZ6CEVgOm0D 8eTQKX9cjAcXb3e0dyRQB0Ew8cGhANRLW8bICQZpm8Kf+Q9noxTzrJvNuNCT8ban b0l7LxcPjG9BeeEGyARxouExsiZgTJ9AayfbIK9yBdh+cqNM/wwZYtN7ycpp215W cLpF4eJMSH2akoEdx1/c =5D6j -----END PGP SIGNATURE----- --3lcZGd9BuhuYXNfi--