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=KmE8dgHYTykGCASVjKROVlh8oMwxtIndYG4buRiSVszsFr6WQb/Ld 0UDY11obI0ToxG2GKnnAI5INlQ+4wS/5/nhSsTpaVgFDgocsHVOFKoTnYe/ZC26/ DMUCJlWEeZFWU99vpI5/cbMxRp6s4hpeG55M8viCJtqtZgw5ezQuBs= 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=DDqTViH71nJPtK0HPvNTAmpN0OQ=; b=uG1Wh4y3IG6StLsxiiFHLkBOGfkv WFTi+bw7yrQOVy3zSC8PIuQptCQd36eb2tQqhMHu4GTkQCwOfZvUDV2Qz1p3dJ93 SathxrkJaCKjxD/l9f9z2P9LE8eMXGZIx2DDdzOEUDQruGzvLMQLH0BofPE7IAon RyRUnJG9vxGZwoA= 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.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Date: Thu, 5 Nov 2015 10:21:10 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Segmentation fault before main Message-ID: <20151105092110.GA18221@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <56338BCC DOT 40709 AT gmail DOT com> <20151030191826 DOT GQ5319 AT calimero DOT vinschen DOT de> <5633C8D0 DOT 2060101 AT gmail DOT com> <563A7BD4 DOT 5050007 AT gmail DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <563A7BD4.5050007@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Nov 4 22:42, Marco Atzeri wrote: > On 30/10/2015 20:45, Marco Atzeri wrote: > >On 30/10/2015 20:18, Corinna Vinschen wrote: > >>On Oct 30 16:25, Marco Atzeri wrote: > >>>Hi Corinna, > >>> > > > >>>Any help will be really appreciated. > >> > >>Well, it's a stack probe. It's typically called when trying to allocate > >>big datastructures on the stack, e.g. with alloca. Did you try to raise > >>the default stacksize in the executable header (see peflags -x and -X > >>options). There's not much else to work with... > >> >=20 >=20 > For the archive, I found the culprit in the test code. I'm happy to read that. > Using "%lu" to print int is not a good idea on cygwin 64 bit. >=20 >=20 > - bbprintf0(stmt,"%ssize_t %s_countset[%lu] =3D {", > + bbprintf0(stmt,"%ssize_t %s_countset[%u] =3D {", > indented(1), > cname(vsym), > rank); ...and you wouldn't even have noticed it on Linux, because it uses the SystemV ABI which passes the first 6 arguments in registers, in contrast to the MS ABI which only passes the first 4 arguments in regs. Thus on Linux you'd have silenty get the benefit of the CPU clearing the upper 32 bits of a register when moving a 32 bit value into it, which doesn't happen when moving a 32 bit argument to the stack. That's one of the interesting side effects of porting an application. Maybe it would make sense to mention this problem in https://cygwin.com/faq/faq.html#faq.programming.64bitporting... > as it could produce >=20 > size_t br_startset[25769803777] =3D {0} ; > size_t br_countset[25769803777] =3D {2}; Ouch. > instead of > size_t br_startset[1] =3D {0} ; > size_t br_countset[1] =3D {2}; >=20 >=20 > as 25769803777 =3D 0x00060001 I guess you mean 0x600000001 :) Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWOx+GAAoJEPU2Bp2uRE+ggEMP/380GeU0zDY3SYiQ1rC9I6SI 6ZT8t9Y6jr9RJCDtaEfuVuygU88I03AX6tGmOxZiarKFeWNLDlZTOxlTRyBT8HG/ ReX4R6myWo0Br641/x68HgooDEQDORpA2dThFPzYtXEhD9TVXmZd0pUc3ODotTc/ 0GzNaOztvOtjNJ+QHh3/6v3heiVJXceKys5U2IJw6lAFxfCkoP2FYgu1XhJZoYzu 9YcfMIj04OJc3DL4JV8QJnOIE+GlE7shYSOwl4VkWEXliA8V0EtaKPS78mxBDK4R TSQBrK5IgIdHYTx86cltojPhHqm0n+VTNBjzkYKRFGSgfhzGuhggCQbLhOzvXXSL uzsA6Bu7eyBxs0opyhRtvaFvF9QHnAC1E7hGDhDZM0BT5Pz3wFK7QIWpLS7PvtOU rnEG6zcB0mgWynYYBJLIYkqJ7SjsMfpJrOWD6MqdzwpeAEPnNDRtf3pG5zhuIRm/ EBkFwmJQn1b78Hfjs0K0JxbkeozSgN4hcFKgQAOP48j1ihN3mD2Tch085sVoUdPy yLjDIpvsfjqd6W2PiTsfx14Q2ZoZ0RRmJpU4+LlBfWP52nt3bgRDXicbnHRPA7Nj lP8DF2N+M39R5mxXGkgLxL1b162s3Q7zTNllA0jYazqLRaYY4g3gdzZh0f4e1Ruz fi9WVocM4ntWFVs03U/X =Gmp/ -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--