Professional Web Applications Themes

-0777 broken in 1.8.1? - Ruby

Version 1.8.0: $ ruby -0777 -ne 'puts $FILENAME' .bash* .bash_history .bash_profile .bashrc .bashrc.funcs .bashrc.mine .bashrc.ode Version 1.8.1: $ ruby -0777 -ne 'puts $FILENAME' .bash* .bash_history .bash_history .bash_history .bash_history .bash_history .bash_history .bash_history .bash_history .bash_history .bash_history ... It appears that gets no longer proceeds to the next input file automatically when $/=0777. (Tested on x86 and alpha) Aron...

  1. #1

    Default -0777 broken in 1.8.1?

    Version 1.8.0:

    $ ruby -0777 -ne 'puts $FILENAME' .bash*
    .bash_history
    .bash_profile
    .bashrc
    .bashrc.funcs
    .bashrc.mine
    .bashrc.ode

    Version 1.8.1:

    $ ruby -0777 -ne 'puts $FILENAME' .bash*
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    .bash_history
    ...

    It appears that gets no longer proceeds to the next input file
    automatically when $/=0777. (Tested on x86 and alpha)

    Aron


    Aron Guest

  2. #2

    Default Re: -0777 broken in 1.8.1?

    Hi,

    In message "-0777 broken in 1.8.1?"
    on 04/02/05, Aron Griffis <net> writes:

    |Version 1.8.1:
    |
    | $ ruby -0777 -ne 'puts $FILENAME' .bash*
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | .bash_history
    | ...
    |
    |It appears that gets no longer proceeds to the next input file
    |automatically when $/=0777. (Tested on x86 and alpha)

    Can't reproduce on my machine (i686-linux). Can you show us more info
    about your platform and exact version (including date) of your interpreter?

    matz.


    Yukihiro Guest

  3. #3

    Default Re: -0777 broken in 1.8.1?

    Yukihiro Matsumoto wrote: [Wed Feb 04 2004, 01:38:55PM EST] 

    ruby 1.8.1 (2003-12-25) [i686-linux-gnu] <<< actually an Athlon-XP
    CFLAGS="-mcpu=athlon-xp -O3 -pipe"

    ruby 1.8.1 (2003-12-25) [alphaev67-linux-gnu]
    CFLAGS="-mcpu=alphaev67 -mieee -O3 -pipe"

    I can built ruby 1.8.0 (2003-08-04) on the same platforms with the same
    CFLAGS and it works fine.

    Aron


    Aron Guest

  4. #4

    Default Re: -0777 broken in 1.8.1?

    In article <20040204210013.GA12956time>,
    Aron Griffis <net> wrote: 
    >
    >ruby 1.8.1 (2003-12-25) [i686-linux-gnu] <<< actually an Athlon-XP
    >CFLAGS="-mcpu=athlon-xp -O3 -pipe"
    >
    >ruby 1.8.1 (2003-12-25) [alphaev67-linux-gnu]
    >CFLAGS="-mcpu=alphaev67 -mieee -O3 -pipe"
    >
    >I can built ruby 1.8.0 (2003-08-04) on the same platforms with the same
    >CFLAGS and it works fine.[/ref]

    Which compiler do you use? When I use -mcpu=athlon-xp -O3 -pipe and try
    the test suite on my Mandrake 9.2 I get errors, but if I turn the
    optimisation down to -O2 it works. Using a stable snapshot from last
    night (just because I was looking at it and have a build script)

    [mikeratdog ruby-stable]$ gcc -v
    Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/specs
    Configured with: ../configure --prefix=/usr --libdir=/usr/lib
    --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
    --enable-shared --enable-threads=posix --disable-checking
    --enable-long-long --enable-__cxa_atexit
    --enable-languages=c,c++,ada,f77,objc,java,pascal
    --host=i586-mandrake-linux-gnu --with-system-zlib
    Thread model: posix
    gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
    [mikeratdog ruby-stable]$ cat build-snap
    #!/bin/bash

    set +e

    target_dir=/usr/local/mike/ruby-snap
    source_archive=stable-snapshot.tar.gz

    rm -rf $target_dir
    mkdir $target_dir

    rm -rf ruby
    tar -zxf $source_archive

    cd ruby
    CFLAGS="-O2 -march=athlon-xp -pipe" ./configure --prefix=$target_dir
    make
    make test
    make install
    cd test
    $target_dir/bin/ruby runner.rb
    [mikeratdog ruby-stable]$

    If I run that then all goes well, and the runner.rb finishes up with

    .......
    Finished in 69.782969 seconds.

    726 tests, 7386 assertions, 0 failures, 0 errors

    If I change -O2 to -O3 then I see this in the out

    E, [2004-02-04T16:35:38.702628 #15571] ERROR -- : CGIHandler:
    /usr/local/mike/src/ruby-stable/ruby/test/soap/calc/server.cgi:
    /usr/local/mike/ruby-snap/lib/ruby/1.8/time.rb:66: [BUG] Segmentation
    fault
    ruby 1.8.1 (2004-02-03) [i686-linux]


    E

    Finished in 69.948753 seconds.

    1) Error:
    test_calc_cgi(SOAP::Calc::TestCalcCGI):
    SOAP::StreamError: Illegal media type.

    When I run the test suite. Maybe it's an optimisation problem. I only
    looked at it for a few minutes before work this morning as I was
    thinking about using the same compiler flags on ruby as on perl.

    Hope this helps,

    Mike
    --
    co.uk | The "`Stok' disclaimers" apply.
    http://www.stok.co.uk/~mike/ | GPG PGP Key 1024D/059913DA
    com | Fingerprint 0570 71CD 6790 7C28 3D60
    http://www.exegenix.com/ | 75D2 9EC4 C1C0 0599 13DA
    Mike Guest

  5. #5

    Default Re: -0777 broken in 1.8.1?

    Mike Stok wrote: [Wed Feb 04 2004, 04:40:03PM EST] 

    I'm using gcc-3.3.2. I just tested with -O0 but the problem persists.
    The fact that it appears with 1.8.1 (on two architectures) but not with
    1.8.0 suggests that it should be possible to narrow down some related
    source changes within ruby.

    Regards,
    Aron


    Aron Guest

  6. #6

    Default Re: -0777 broken in 1.8.1?

    Aron Griffis wrote:
     
    >
    >I'm using gcc-3.3.2. I just tested with -O0 but the problem persists.
    >The fact that it appears with 1.8.1 (on two architectures) but not with
    >1.8.0 suggests that it should be possible to narrow down some related
    >source changes within ruby.
    >
    >Regards,
    >Aron
    >
    >[/ref]
    I ran into this with 1.8.1 last week, where the end-of-file was not
    being detected when the input record separator is null. This seems to
    have been fixed in io.c (on 26 December 2003). It now works correctly in
    the CVS version:

    ~/src/ruby-1.8.0% ./ruby -v; ./ruby -0777 -ne 'puts $FILENAME' ran*
    ruby 1.8.0 (2003-06-23) [i686-linux]
    random.c
    random.o
    range.c
    range.o

    ~/src/ruby-1.8.1% ./ruby -v; ./ruby -0777 -ne 'puts $FILENAME' ran*
    ruby 1.8.1 (2003-12-25) [i686-linux]
    random.c
    random.c
    random.c
    random.c
    random.c
    random.c
    ...

    ~/src/ruby-cvs/ruby% ./ruby -v; ./ruby -0777 -ne 'puts $FILENAME' ran*
    ruby 1.9.0 (2004-02-06) [i686-linux]
    random.c
    random.o
    range.c
    range.o


    --Jeff

    --
    Jeff Pace / org




    Jeff Guest

  7. #7

    Default Re: -0777 broken in 1.8.1?

    Jeff Pace wrote: [Thu Feb 05 2004, 10:19:02PM EST] 

    Thanks Jeff! That does the trick! Sounds like 1.8.2 should be right
    around the corner... ;-)

    Aron


    Aron Guest

Similar Threads

  1. broken
    By mankybar21 in forum Macromedia Flash Player
    Replies: 1
    Last Post: March 8th, 04:47 AM
  2. PF Broken
    By Andrew in forum FreeBSD
    Replies: 3
    Last Post: February 28th, 02:01 PM
  3. Broken key
    By Anders Gjendemsjø in forum Linux Setup, Configuration & Administration
    Replies: 9
    Last Post: July 8th, 07:47 AM
  4. Broken CD
    By Jim in forum Windows XP/2000/ME
    Replies: 1
    Last Post: July 7th, 08:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139