|
From: Rocky B. <roc...@gm...> - 2007-04-24 08:08:44
|
I've just compiled bash 3.2.15 on GNU/Linux (with gcc version 4.1.0 and -O2
optimization). I was able to run the regression tests without any errors
both on bashdb 3.1-0.08 and current CVS sources.
On cygwin where I noticed a failure, I was using the installed bash from the
Interent. Furthermore bashdb wasn't using readarray the C-compiled
extension.
Given this, right now the evidence suggests that the problem mentioned in
this thread is in the bash 3.2.15 binary on cygwin.
On 4/19/07, Rocky Bernstein <roc...@gm...> wrote:
>
> I spent a little time looking at this after a very long day at work. Alas
> I'm too tired to investigate further so I'll just report what I know at
> present.
>
> In short, as best as I can tell I think this is a bug in bash. Details are
> below, but if things were working before and with the latest round of
> patches things got broken, it would indicate that either bash introduced a
> bug or there is something invalid that bashdb is doing that causes bash to
> behave badly. Although I tried this on cygwin, but it would be interesting
> to try to compile on a different platform to see if similar failures occur.
>
> Some details follow. At the line mentioned, line 944 of dbg-cmd.inc, I
> turned on set -x tracing. Basically I added this:
> export PS4='(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]}\n'
> set -x
> and a matching set +x later on. The attached patch might be of help here.
>
> To run just the failing program one can go into the test directory and run
> "./brkpt2.tests"
>
> Here is what I see near the failure:
>
> ...
> + ### another x command...
> + x j
> (((((../dbg-cmds.inc:946): _Dbg_do_x
> _Dbg_is_var j
> (((((../dbg-fns.inc:126): _Dbg_is_var
> declare -p j
> (((((../dbg-fns.inc:127): _Dbg_is_var
> [[ 0 != 0 ]]
> (((((../dbg-fns.inc:130): _Dbg_is_var
> echo 1
> ((((../dbg-cmds.inc:946): _Dbg_do_x
> (( declare -i j="1"
> 1 ))
> ../dbg-cmds.inc: line 946: declare -i j="1"
> 1 : syntax error in expression (error token is "j="1"
> 1 ")
>
> What's wrong here is that line 946 is not " (( declare -i j="1" .... but
>
> if (( `_Dbg_is_var $_Dbg_expr` )) ; then
>
> So what seems to be happening is that the wrong text is getting
> substituted back inside the backtick. What you should have seen was (( 1 ))
> because there was that "echo 1". Interestingly whenever _Dbg_is_var decides
> to run "echo 0" instead of "echo 1", that does get substituted back
> correctly.
>
> I'll attach a log of my run. Finally, I don't know if this is related, but
> I seem to be getting "out of resource" errors after running the tests.
>
> 5 [main] sh 64760 fork: child -1 - CreateProcessA failed, errno 11
> ../dbg-pre.inc: fork: Resource temporarily unavailable
> 5 [main] sh 64676 fork: child -1 - CreateProcessA failed, errno 11
>
> With Windows ,one never knows what's going on.
>
>
>
>
> On 4/19/07, Eric Blake <eb...@by...> wrote:
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I was trying to upgrade the cygwin installation of bashdb to the latest
> > release, and encountered 2 test failures atop bash-3.2.15. I'm not
> > familiar enough with the bashdb sources to know where to look for the
> > cause of these two failures, but since they all mention dbg-cmds.incline
> > 944, I wonder if there is a bug there. Any ideas?
> >
> > checking brkpt1...
> > checking brkpt2...
> > - --- /home/eblake/bashdb-3.1_0.08-1/build/test/brkpt2.check 2007-04-19
> > 06:42:53.453125000 -0600
> > +++ /home/eblake/bashdb-3.1_0.08-1/src/bashdb-3.1-0.08/test/brkpt2.right
> > 2007-01-19 20:43:30.000000000 -0700
> > @@ -195,19 +195,13 @@
> > 11: local -i j=i+1
> > + ### another x command...
> > + x j
> > - -../dbg-cmds.inc: line 944: ((: declare -i j="1"
> > - -1 : syntax error in expression (error token is "j="1"
> > - -1 ")
> > - -1
> > +declare -i j="1"
> > + ### another x command (+5 than value above) ...
> > + x j+5
> > 6
> > + ### x command of string y
> > + x y
> > - -../dbg-cmds.inc: line 944: ((: declare -- y="b"
> > - -1 : syntax error in expression (error token is "y="b"
> > - -1 ")
> > - -y
> > +declare -- y="b"
> > + ### x of a function ...
> > + x fn2
> > fn2 ()
> > FAIL: run-brkpt
> >
> > - --- /home/eblake/bashdb-3.1_0.08-1/build/test/command.check
> > 2007-04-19
> > 06:44:10.843750000 -0600
> > +++ /home/eblake/bashdb-
> > 3.1_0.08-1/src/bashdb-3.1-0.08/test/command.right
> > 2006-12-03 15:30:52.000000000 -0700
> > @@ -20,10 +20,7 @@
> > + continue
> > Breakpoint 1 hit (1 times).
> > + x x
> > - -../dbg-cmds.inc: line 944: ((: declare -- x="22"
> > - -1 : syntax error in expression (error token is "x="22"
> > - -1 ")
> > - -22
> > +declare -- x="22"
> > (dbg-test1.sh:23):
> > 23: y=23
> > + #
> > FAIL: run-command
> >
> > - --
> > Don't work too hard, make some time for fun as well!
> >
> > Eric Blake eb...@by...
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.5 (Cygwin)
> > Comment: Public key at home.comcast.net/~ericblake/eblake.gpg<http://home.comcast.net/%7Eericblake/eblake.gpg>
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFGJ2ow84KuGfSFAYARAok2AJ9jZn/f4/EDZHXQBOaQyIhgSqLS2wCgqV4O
> > Vw3+oI0N6WeoE9jQps34V4Y=
> > =Fl9N
> > -----END PGP SIGNATURE-----
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Bashdb-devel mailing list
> > Bas...@li...
> > https://lists.sourceforge.net/lists/listinfo/bashdb-devel
> >
>
>
>
|