[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: Rugxulo
Subject: Re: ZILE 2.3.10 (Autoconf 2.64 finds deadly DJGPP Bash bug)
Date: Sat, 22 Aug 2009 00:27:24 -0500


On Thu, Aug 20, 2009 at 6:51 PM, Eric Blake<address@hidden> wrote:
> According to Rugxulo on 8/20/2009 5:18 PM:
>> For whatever reason, "./configure" (produced by 2.64) uses "return
>> $ac_retval" in five spots, and that's where it crashes ("checking for
>> GNU C compiler ...") for no good reason, and on Vista without even
>> reporting the GPF crash dump!
>> Workaround? Add parentheses around it.
>> sed -i -e '/return \$ac_retval/s//( & )/' configure
>> I have tested both DJGPP 2.03p2 and 2.04 (with my local ZILE hacks, of
>> course), and it now builds again for 2.3.10. Rejoice!!   :-)
> Wow, that's an old version of bash.  The oldest one I have built up is
> bash 2.05a, where you don't need a subshell to get return to work.

No, you misunderstood (although you're not far off). I'm using Bash
2.05b from DJGPP's /beta/ (libc 2.04) section. It's a 2004 compile
from a 2002 product. That's not that old, honestly. Besides, looking
at the GNU ftp archive for Bash, it seems to have jumped immediately
from 2.05b (2002) to 3.0 (2004), and immediately from 3.2 (2009) to
latest 4.0.

> I guess if it is trivial to support bash 2.04, we can do so (although I'm
> not looking forward to building it, since it appears to have fallen out of
> use on every platform except your DGJPP setup).  So, to clarify, what does
> this do for you?
> bash -c 'fun () { return $1; }; fun 2; echo $?'


> and likewise with '{ ( return $1 ); }' as the function body?


> Or does it require a more complex function body, to show the difference
> where the subshell avoids the crash?  At any rate, we'll need to
> characterize exactly what your shell's bug is.

Obviously simple functions work, so it must be some deeper problem.
But Bash isn't exactly trivial code, quite complex, and as you know,
DOS/Windows don't support fork, hence there has to be even more
trickery just to get Bash ported at all (which is probably why we lag
behind a bit). Honestly, I do suspect it's a local bug and not a
bigger Bash one, but I can't say for sure.

> However, the whole point of using 'return $ac_retval' without a subshell
> is to avoid forking, and catering to bash 2.04 brokenness (if it is indeed
> a bash bug fixed for 2.05a, as I suspect) is a step backwards.

You really think that this will slow everything down? Have you tested
it on your machine? (hint hint)    :-)

P.S. DJGPP actually supports two versions of itself, the well-tested
"stable" 2.03p2 (/current/) and the less-tested "unfinished" 2.04
(/beta/). The former uses Bash 2.04, and the later has 2.05b. I pretty
much prefer DJGPP 2.04 and pals (e.g. Bash 2.05b), but some (e.g.
famous Eli Z., currently working on GDB 7.0 and just finished Emacs
23.1) heavily prefer 2.03p2. Hence it's not unreasonable to say that
people are using these shells a lot. However, I'm not opposed to
personally patching / updating the Bash port, but I'm very limited in
skills in that area, so I can't guarantee it. Hence a workaround is
more likely to be the best I can suggest. But I'll do my best to take
a closer look, if you have suggestions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]