From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygcheck -svc segfaults on Windows 8.1 with cygwin64
Date: Tue, 19 Nov 2013 10:03:00 -0000 [thread overview]
Message-ID: <20131119100343.GA27525@calimero.vinschen.de> (raw)
In-Reply-To: <1384839303.14356.YahooMailNeo@web125203.mail.ne1.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 1922 bytes --]
On Nov 18 21:35, Gabriel Marcano wrote:
> cygcheck -svc causes a segfault on Windows 8.1 on line 1610 of cygcheck.cc, based on gdb output. I'm including some gdb output below that showcases this issue:
>
>
> 1610 strcat (osname, products[prod]);
> (gdb) list
> 1605 if (prod == PRODUCT_UNLICENSED)
> 1606 strcat (osname, "Unlicensed");
> 1607 else if (prod > PRODUCT_PROFESSIONAL_WMC)
> 1608 strcat (osname, "");
> 1609 else
> 1610 strcat (osname, products[prod]);
> 1611 }
> 1612 else
> 1613 {
> 1614 }
> (gdb) p prod
> $1 = 101
> (gdb) p sizeof(products)/sizeof(void*)
> $2 = 101
>
>
> '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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-11-19 10:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 5:35 Gabriel Marcano
2013-11-19 10:03 ` Corinna Vinschen [this message]
2013-11-19 16:38 ` Warren Young
2013-11-19 17:13 ` Corinna Vinschen
2013-11-19 18:23 ` Charles Wilson
2013-11-19 19:03 ` Corinna Vinschen
2013-11-19 19:21 ` Larry Hall (Cygwin)
2013-11-19 20:30 ` Corinna Vinschen
2013-11-19 20:36 ` Corinna Vinschen
2013-11-19 21:06 ` Andrey Repin
2013-11-19 21:51 ` Corinna Vinschen
2013-11-19 22:34 ` Corinna Vinschen
2013-11-19 23:41 ` Jim Garrison
2013-11-20 8:59 ` Csaba Raduly
2013-11-19 23:08 ` Warren Young
2013-11-20 10:04 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131119100343.GA27525@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).