public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygcheck -s segfaults in cygwin64 on Win7Pro-64
Date: Tue, 21 Oct 2014 11:03:00 -0000	[thread overview]
Message-ID: <20141021110310.GD32374@calimero.vinschen.de> (raw)
In-Reply-To: <t43c4aha2fardlfn1go3hdb5ajbog9lf0t@4ax.com>

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

On Oct 21 04:03, Andrew Schulman wrote:
> > Instead, I found that COMSPEC needs to be set in the environment or I get a 
> > segfault as shown in my previous email below.  I don't know why that is, 
> > but I can easily demonstrate it.
> 
> Confirmed here.  I had actually already seen this segfault too, but I
> hadn't figured out it was caused by empty COMSPEC.

That's interesting.  I just debugged this a bit.  As you know, cygcheck
is a native Windows application (it's supposed to work even if Cygwin
is entirely broken).

At one point it tries to fetch information about the installed services
by calling cygrunsrv --list --verbose.  It tries to accomplish that by
calling the MSVCRT version of popen(2).  And it's that call to popen
which crashes if COMSPEC is not set, or not set correctly.

I applied a patch to cygcheck, which enforces setting COMSPEC if the
variable is unset.  That doesn't help against *wrong* settings of COMSPEC,
but that's really user's fault alone, I think :)

I also created a new snapshot on https://cygwin.com/snapshots/ which
comes with a cygcheck containing that patch.


HTH,
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: 819 bytes --]

  reply	other threads:[~2014-10-21 11:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 19:43 Starting mintty via run.exe John Wiersba
2014-10-16 23:34 ` Eliot Moss
2014-10-17  3:39   ` John Wiersba
2014-10-17  3:51     ` John Wiersba
2014-10-17 13:14       ` Eliot Moss
2014-10-17 21:52         ` cygcheck -s segfaults in cygwin64 on Win7Pro-64 John Wiersba
2014-10-18  3:59           ` Marco Atzeri
2014-10-20 22:39             ` John Wiersba
2014-10-21  8:03               ` Andrew Schulman
2014-10-21 11:03                 ` Corinna Vinschen [this message]
2014-10-21 15:31                   ` John Wiersba
2014-10-21 16:54         ` run.exe flashes non-hidden console window " John Wiersba
2014-10-22 13:50           ` Andrey Repin
2014-10-22 20:37             ` John Wiersba
2014-10-23  0:20               ` Doug Henderson
2014-10-23  1:35                 ` Andrey Repin
2014-10-23  8:42                   ` Andrew Schulman
     [not found]                   ` <1414037878.2285.YahooMailNeo@web162805.mail.bf1.yahoo.com>
2014-10-23 12:24                     ` John Wiersba
2014-10-23 17:56                       ` Achim Gratz
2014-10-23 18:47                         ` John Wiersba
2014-10-23 18:34                       ` Doug Henderson
2014-10-23 19:15                         ` John Wiersba
2014-10-23 19:40           ` Doug Henderson
2014-10-23 20:26             ` John Wiersba
2014-10-23 20:52               ` Achim Gratz
2014-10-23 21:25                 ` John Wiersba

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=20141021110310.GD32374@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).