[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug)
From: |
Chet Ramey |
Subject: |
Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug) |
Date: |
Fri, 28 Aug 2009 19:06:54 -0400 |
User-agent: |
Thunderbird 2.0.0.23 (Macintosh/20090812) |
Rugxulo wrote:
> Here's Gordon's simple example to narrow down the problem:
>
> http://www.delorie.com/djgpp/mail-archives/browse.cgi?p=djgpp/2006/08/08/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=djgpp/2006/08/20/11:54:36
He's probably right. The post-fork child branch of command_substitute
makes no attempt to restore its environment before calling exit. There
are a number of places in the code that rely on Unix/Posix fork()
semantics; this is one of them. The 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). More 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
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), (continued)
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Ralf Wildenhues, 2009/08/22
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Rugxulo, 2009/08/22
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Paolo Bonzini, 2009/08/23
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Reuben Thomas, 2009/08/23
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Rugxulo, 2009/08/26
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Paolo Bonzini, 2009/08/26
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug), Rugxulo, 2009/08/26
- Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug),
Chet Ramey <=