X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <44E87F85.2040409@iki.fi> Date: Sun, 20 Aug 2006 18:28:05 +0300 From: Andris Pavenis User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: That BASH crash, revisited References: <44e21a48$0$489$cc7c7865 AT news DOT luth DOT se> <86p3bbv6ppj DOT fsf AT sirppi DOT helsinki DOT fi> In-Reply-To: <86p3bbv6ppj.fsf@sirppi.helsinki.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Esa A E Peuha kirjoitti: > Martin Str|mberg writes: > >> Doing that, it reveals to me that it seems to be some kind of >> corruption that happens somewhere in excute_cmd.c: >> execute_simple_command() or in what is called from there. A watchpoint >> tells me that it's changed in nofork.c: nofork_save_all_environment() >> and nofork_restore_all_environment(). But that does not seem to be the >> place of corruption. > > It _is_ the place of corruption. The function command_substitute() does > setjmp(return_catch) before it executes the command, but it doesn't > restore the old value of return_catch afterwards, so any longjmp to > return_catch goes back inside command_substitute() even after it has > returned. This is no problem on other platforms, becuse the function > will just exit, but on DJGPP it calls nofork_restore_all_environment() > again, which pretty much destroys the environment. > Have somebody tried to get bash-3.0 (or better 3.1 working for DJGPP). Long time ago I tried with bash-3.0, but results was not satisfactory and I didn't have enough time for debugging. Andris