On 30 August 2013 07:11, Glenn Fowler <[email protected]> wrote:
>
> On Fri, 30 Aug 2013 04:53:04 +0200 Cedric Blancher wrote:
>> On 29 August 2013 19:45, Glenn Fowler <[email protected]> wrote:
>> >
>> > the AT&T Software Technology ast alpha 2013-08-29 source release
>> > has been posted to the download site
>> >         http://www.research.att.com/sw/download/alpha/
>> > the package names and md5 checksums are
>> >             INIT  132e0403af573fa1cb1e202267fedeb8
>> >         ast-open  334615fb3a652575106194c281d27b5c
>> >          ast-ksh  ebcc56d9ab673aaafbb163d6eee1a93c
>> > the md5 sums should match the ones listed on the download page
>> >
>> > this is still a work in progress, but we are getting closer to a beta
>
>> No, you don't. This release if OFFICIALLY broken beyond usability and 
>> USELESS.
>> You really had to try and tinker with cd -@ again, did you? I'm really
>> angry. cd .. no longer works within NFSv4 xattr directories, e.g.
>> echo "" >x ; cd -@ x ; touch xattr ; cd .. ; rm x now fails with a cd:
>> /home/ced/prod4/test19/x//@//..: [Not a directory]
>
>         hey gsf, there's a problem with the way you did foo

OK. I overcooked. But see it this way: We use cd -@ in production. We
badly need it there. Solaris+Illumos has cd -@ in most of its shells.
The ksh93 release which has critical bugfixes has cd -@ busted several
times in a row. The own management screws my thumbs over (lack of)
progress.

>         here's a sequence of commands / code that shows the problem
>
> its a bug
> patch is below
> with ksh builtins like wc you should be able to do things like
>
>         wc /home/ced/prod4/test19/x//@//xattr
>
> and you get a pwd that can be passed on to other processes and used
> long after your process dies
>
>         /home/ced/prod4/test19/x//@//
>
> --- .../src/lib/libast/path/pathcanon.c Aug 29 02:37:08 2013
> +++ src/lib/libast/path/pathcanon.c Aug 30 01:03:41 2013
> @@ -551,7 +551,12 @@
>                                         }
>                                         *(t - 2) = '.';
>                                 }
> -                               if (t - 5 < r)
> +                               if ((t - 3) == x)
> +                               {
> +                                       if ((t -= 7) == p)
> +                                               t++;
> +                               }
> +                               else if (t - 5 < r)
>                                 {
>                                         if (t - 4 == r)
>                                                 t = r + 1;
> @@ -672,7 +677,7 @@
>                                         *t++ = '@';
>                                         *t++ = '/';
>                                         *t++ = '/';
> -                                       r = x = t;
> +                                       x = t;
>                                 }
>                                 break;
>                         }

That patch fixes nothing. The code will sooner or very sooner trip
over two facts:
- Script build paths from elements
- Elements will have leading or training slashes
- A lot of applications or scripts use the traditional name for a
lock: that's the filename '@', or '@@', or '@@@'. Not accounting for
Windows users where internet explorer dumps a lot of alternate stream
files with '@' iside.

You've found the worst possible way to implement the script
interpreter equivalent of a ticking tactical nuclear weapon, and no
failsafe option to turn it off.

Ced
-- 
Cedric Blancher <[email protected]>
Institute Pasteur
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to