[#4858] Build fails on OSX Tiger 10.4 — noreply@...

Bugs item #1883, was opened at 2005-05-06 14:55

21 messages 2005/05/06
[#4862] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Yukihiro Matsumoto <matz@...> 2005/05/07

Hi,

[#4865] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Ryan Davis <ryand-ruby@...> 2005/05/07

[#4868] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — nobu.nokada@... 2005/05/07

Hi,

[#5053] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Shugo Maeda <shugo@...> 2005/05/19

Hi,

[#5056] Re: [ ruby-Bugs-1883 ] Build fails on OSX Tiger 10.4 — Mark Hubbart <discordantus@...> 2005/05/19

On 5/19/05, Shugo Maeda <shugo@ruby-lang.org> wrote:

[#4874] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...>

Hello all,

31 messages 2005/05/10
[#4879] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Pit Capitain <pit@...> 2005/05/11

Ilias Lazaridis schrieb:

[#4883] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

Pit Capitain wrote:

[#4884] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ryan Davis <ryand-ruby@...> 2005/05/12

[#4888] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

Ryan Davis wrote:

[#4889] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — ES <ruby-ml@...> 2005/05/12

[#4890] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Ilias Lazaridis <ilias@...> 2005/05/12

ES wrote:

[#4891] Re: [THIN] - Need to reduce Ruby Sources to the Minimal — Alexander Kellett <ruby-lists@...> 2005/05/12

On May 12, 2005, at 3:13 PM, Ilias Lazaridis wrote:

[#4911] Pointless argc check in Array#select — noreply@...

Patches item #1900, was opened at 2005-05-12 09:33

11 messages 2005/05/12

[#4919] - Hierarchical/Modular Directory Structure — Ilias Lazaridis <ilias@...>

The source-code structure should be simplified, lowering barriers for

20 messages 2005/05/12

[BUG] Infinite loop on YAML.dump (Re: ruby-list:40801)

From: "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date: 2005-05-08 07:14:02 UTC
List: ruby-core #4869
Hello.

Kouhei Yanagita reported infinite loop bug on YAML.dump.
Please try attached file.

This bug occurs because 7th anchor tag never be generated. (if block never be executed)

Index: emitter.c
===================================================================
RCS file: /src/ruby/ext/syck/emitter.c,v
retrieving revision 1.11
diff -u -w -b -p -r1.11 emitter.c
--- emitter.c	6 May 2004 06:29:56 -0000	1.11
+++ emitter.c	8 May 2005 06:19:25 -0000
@@ -383,6 +383,8 @@ syck_emitter_start_obj( SyckEmitter *e, 
                  */
                 idx = e->anchors->num_entries + 1;
 
+                printf("------> %d %d %d\n", idx, n->pos, e->bufpos);
+
                 /*
                  * Create the anchor tag
                  */
                if ( n->pos >= e->bufpos )
                {


------> 1 3 0
------> 2 680 0
------> 3 1357 0
------> 4 2034 0
------> 5 2511 0
------> 6 3188 0
------> 7 3865 4094
(...)
------> 7 3865 8148
(...)

e->bufpos keeps incresing in syck_emitter_flush (by e->bufpos += check_room)

/////////////////////////////////////////////

I'm wondering if this code can be executed correctly when coresponding part of buffer is flushed.

                    /*
                     * Write the anchor into the buffer
                     */
                    S_MEMMOVE( start + alen, start, char, e->marker - start );
                    S_MEMCPY( start + 1, anchor_name, char, strlen( anchor_name ) );
                    start[0] = '&';
                    start[alen - 1] = ' ';
                    e->marker += alen;


Nobody can predict which object needs anchor, so should "fixed size buffer & flush" be abondoned
and whole YAML document be held in memory?

Thank you.

Attachments (1)

test.rb (4.84 KB, text/x-ruby)
module Uploader
  class Item
    def initialize(fn, filesize, number, last_modified, comment)
      @filename = fn
      @filesize = filesize
      @number = number
      @last_modified = last_modified
      @comment = comment
    end
    attr_reader :filename, :last_modified, :comment, :number, :parent, :filesize
    attr_writer :filename, :last_modified, :comment, :parent
  end

  class ItemGroup
    def initialize(number, title)
      @items = []
      @number = number
      @title = title
    end
    attr_reader :items, :number, :title
  end
end


s = DATA.read(nil)
require 'yaml'
a = YAML.load(s)
YAML.dump(a)

__END__
--- 
- &id001 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_001-001.png
      filesize: 0
      last_modified: 2005-05-05 23:48:36.925874 +09:00
      number: 1
      parent: *id001
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_001-002.png
      filesize: 0
      last_modified: 2005-05-05 23:49:06.215396 +09:00
      number: 2
      parent: *id001
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_001-003.png
      filesize: 0
      last_modified: 2005-05-05 23:49:14.766506 +09:00
      number: 3
      parent: *id001
  number: 1
  title: ''
- &id002 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_002-001.png
      filesize: 0
      last_modified: 2005-05-05 23:49:33.673146 +09:00
      number: 1
      parent: *id002
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_002-002.png
      filesize: 0
      last_modified: 2005-05-05 23:50:34.406009 +09:00
      number: 2
      parent: *id002
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_002-003.png
      filesize: 0
      last_modified: 2005-05-05 23:50:47.014970 +09:00
      number: 3
      parent: *id002
  number: 2
  title: ''
- &id003 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_003-001.png
      filesize: 0
      last_modified: 2005-05-05 23:51:02.901020 +09:00
      number: 1
      parent: *id003
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_003-002.png
      filesize: 0
      last_modified: 2005-05-05 23:51:16.231563 +09:00
      number: 2
      parent: *id003
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_003-003.png
      filesize: 0
      last_modified: 2005-05-05 23:51:26.205355 +09:00
      number: 3
      parent: *id003
  number: 3
  title: ''
- &id004 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_004-001.png
      filesize: 0
      last_modified: 2005-05-05 23:51:46.070679 +09:00
      number: 1
      parent: *id004
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_004-002.png
      filesize: 0
      last_modified: 2005-05-05 23:51:56.024703 +09:00
      number: 2
      parent: *id004
  number: 4
  title: ''
- &id005 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_005-001.png
      filesize: 0
      last_modified: 2005-05-05 23:52:14.245472 +09:00
      number: 1
      parent: *id005
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_005-002.png
      filesize: 0
      last_modified: 2005-05-05 23:52:32.349775 +09:00
      number: 2
      parent: *id005
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_005-003.png
      filesize: 0
      last_modified: 2005-05-05 23:52:48.999153 +09:00
      number: 3
      parent: *id005
  number: 5
  title: ''
- &id006 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_006-001.png
      filesize: 0
      last_modified: 2005-05-05 23:53:09.944092 +09:00
      number: 1
      parent: *id006
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_006-002.png
      filesize: 0
      last_modified: 2005-05-05 23:53:21.048095 +09:00
      number: 2
      parent: *id006
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_006-003.png
      filesize: 0
      last_modified: 2005-05-05 23:53:31.622946 +09:00
      number: 3
      parent: *id006
  number: 6
  title: ''
- &id007 !ruby/object:Uploader::ItemGroup 
  items: 
    - !ruby/object:Uploader::Item 
      comment: ''
      filename: hogehoge_007-001.png
      filesize: 0
      last_modified: 2005-05-05 23:53:09.944092 +09:00
      number: 1
      parent: *id007
  number: 7
  title: ''

In This Thread

Prev Next