From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19154 invoked by alias); 19 Nov 2013 10:03:55 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 19140 invoked by uid 89); 19 Nov 2013 10:03:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.3 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from Unknown (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Nov 2013 10:03:52 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id B45CF1A0C5D; Tue, 19 Nov 2013 11:03:43 +0100 (CET) Date: Tue, 19 Nov 2013 10:03:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: cygcheck -svc segfaults on Windows 8.1 with cygwin64 Message-ID: <20131119100343.GA27525@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <1384839303.14356.YahooMailNeo@web125203.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <1384839303.14356.YahooMailNeo@web125203.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-11/txt/msg00335.txt.bz2 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2665 On Nov 18 21:35, Gabriel Marcano wrote: > cygcheck -svc causes a segfault on Windows 8.1 on line 1610 of cygcheck.c= c, based on gdb output. I'm including some gdb output below that showcases = this issue: >=20 >=20 > 1610=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 strcat (osname, products[prod= ]); > (gdb) list > 1605=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (prod =3D=3D PRODUCT_UNLICENSED) > 1606=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 strcat (osname, "Unlicensed"); > 1607=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else if (prod > PRODUCT_PROFESSIONAL_WMC) > 1608=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 strcat (osname, ""); > 1609=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else > 1610=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 strcat (osname, products[prod= ]); > 1611=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 } > 1612=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 else > 1613=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 { > 1614=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 } > (gdb) p prod > $1 =3D 101 > (gdb) p sizeof(products)/sizeof(void*) > $2 =3D 101 >=20 >=20 > 'products[prod]' in this case is accessing memory outside of the > 'products' array. The odd thing is that a few lines back, the > declaration of products includes 104 elements. I do not know why this > discrepancy exists-- anyone have a clue? Yes. The size of the array is not what you think it is. The reason is that several commas are missing. Since I created this array, it's all my fault :} I didn't notice this because I'm using the Enterprise version which have a product value 4, which is pretty safe. I'm going to fix this in CVS today, but at the same time I'm also going to look for a solution to differ between Windows 8 and 8.1 (also 2012 vs. 2012R2) in the cygcheck output. Right now cygcheck just prints Windows 8. Thanks for the report, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSizd/AAoJEPU2Bp2uRE+gNWAQAIq/R9Ag+u0xbqy9TjPIlbSH ETCwjSpfSLGV3jLAnL68Yb9cXGWxjoQLJmRoHbJRpyQKTqDqxeB17F6Sf//JC3bY 8bA+JcbALsE7bT/UjJ4tbYUeLQ8t6YNgLo6Vata4XcsW4KNWiybpuAogf/qgW64r v/H3v14IiZPP4wzjwX0fT7xqz1g9YjchLrMU5Degun4/DLveMkh1VvM4zuVyAVqM rZXd5dbWHKqzPnCIvRrSmtU2wmn+b11oLMm7Hu7qx8QSDHwnJ85ASLEhxxxueZpU UWqK3D+JTdORj+iyDuLTVB/cKkk1e7LSpXfRkPOTXDJiHD+uz/xMqRgzTAHq+tF/ tyQQnVeoscp4HE24a3bFuGwV4Mr7RzPkoWGZS3pTGT/cD4ff28xekXYJ5sxb4+mi dCnNzDgS6TFbRyLxw+iIKXRwuTabn53GA+q8ORG6AwMN874R4W9W9+EjIQU/f5nN etYkGeS9zcyO6EnRlf8z3oJPTJh/+86GYMKTuoQ4hSKub17eeWnXY3yfdq9yEr+P mz8ZPpx6jyj6WN1Rq1MA+SZ4Ih928WhLvppNkC3C5dH6fBkariXsj1HRzkC25Yki 7oPDHyBSRc6hXr484+o/2AmBxqPIbPRAGLduU69kB4Q7bWLOFyklY5hy0ZjXYAIe 2m+AwypHSoEAcqDukcWz =Krtk -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--