delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/16/11:28:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Blake <ebb9 AT byu DOT net>
Subject: Re: job control "Bad address" error
Date: Tue, 16 Jun 2009 15:28:14 +0000 (UTC)
Lines: 26
Message-ID: <loom.20090616T152044-225@post.gmane.org>
References: <7vd494i72q DOT fsf AT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Haojun Bao <baohaojun <at> gmail.com> writes:

> type the command:
>     cat|cat <Enter>
> 
> type ^Z, type
>     bg <Enter>

I can also reproduce it under cygwin 1.7, and further clarified that it is the 
second cat that is failing:

$ sleep 100 | cat
^Z
$ bg
cat: -: Bad address

I'm not quite sure how to strace this, since you can't use ^Z to suspend an 
active strace.  But my guess is that there is a bug in cygwin1.dll pipe 
handling code, such that it dereferences bad memory when resuming execution of 
a read from a pipe after a SIGSTOP; cat is just reporting the EFAULT from a 
failed read() call.

-- 
Eric Blake
volunteer cygwin coreutils maintainer



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019