X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=OpRKxYz7SSrbJCk+KIa11DIVXxgtDBKE6WpoFUtfF3A=; b=tAEMn3dmNngE+g60k9ZMURy+HQHx4hP26mvzDv/6zPEz0XeoEHztU3E26uV14X/Ex6 CFfqcQ6ZB+U9DjBkeHeNLIoc4rfnzkBZvs9Ir3/J7Zo5A4F+P0TrFE70PXQWTQLiTd1m Co0ctiR+bNoKVdZhIyKrioB9UGJ/xDjKe6nOE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=rzAca1olyPv8/o8ju7nP1VCVj0XnSjije+2vGsoOKOq6XX2rCeNrrZBkOAvR2Y/Kj/ mJWcAcsmUvO/psVKIR6yDgj1U2Z4g89ezzaXpRN3IMmD8awHyYIiZwBZPNA4BNuc1ihT ltyDzxsXu0wjHbgQyhOiN8sa+2h9wpKrdMWkg= MIME-Version: 1.0 In-Reply-To: <4A98630E.7010104@case.edu> References: <93c172b50908201212s7bf91133w392f8d558d0d57a AT mail DOT gmail DOT com> <93c172b50908201618w266a26fdidb948f8cdc9dffd3 AT mail DOT gmail DOT com> <4A8DE181 DOT 5070500 AT byu DOT net> <20090822074417 DOT GA9293 AT gmx DOT de> <93c172b50908252105h17ec9802v18d6bc9180ea4a8 AT mail DOT gmail DOT com> <4A98630E DOT 7010104 AT case DOT edu> Date: Fri, 28 Aug 2009 19:26:01 -0500 Message-ID: <93c172b50908281726r2bbad086ta7d18dcccffe142@mail.gmail.com> Subject: Fwd: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug) From: Rugxulo To: djgpp-workers AT delorie DOT com Cc: Charles Sandmann Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi guys, does this help you any? ---------- Forwarded message ---------- From: Chet Ramey Date: Fri, Aug 28, 2009 at 6:06 PM Subject: Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug) To: Rugxulo Cc: bug-autoconf AT gnu DOT org, chet DOT ramey AT case DOT edu Rugxulo wrote: > Here's Gordon's simple example to narrow down the problem: > > http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=3Ddjgpp/2006/08/0= 8/16:37:27 > > And here's Esa's attempt to identify why it crashes. Possibly a setjmp > not returning. (Note that nobody has been able to fix this yet. Even > back in 2006 both Martin and Andris tried and failed.) > > http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=3Ddjgpp/2006/08/2= 0/11:54:36 He's probably right. =A0The post-fork child branch of command_substitute makes no attempt to restore its environment before calling exit. =A0There are a number of places in the code that rely on Unix/Posix fork() semantics; this is one of them. =A0The problem will occur only on systems like DJGPP that don't have fork and don't perfectly emulate it. If someone wants to take another run at fixing it, there are other places in the code that save and restore a jump_buf (or, as bash calls it, procenv_t). =A0More modern versions of bash use a COPY_PROCENV macro, defined in bashjmp.h; you could copy that or roll your own using bcopy/memcpy. Chet