Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 95cd5e9a70fbd167089e2bd034979cee3f1d69e4b9ef2f314fcc55a6179d4af5
Ticket: 31cdc84bd27af080305973c5f8c5696b2c7c70a3
::yaml::_parsePlainScalarInBlock only parses the first 5 lines of a plain scalar
User & Date: anonymous on 2024-03-13 17:21:17
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    This commit appears to have inadvertently added a debug break that causes ::yaml::_parsePlainScalarInBlock to stop after the fifth line of a plain multi-line scalar:
    https://core.tcl-lang.org/tcllib/info/fc59390525aeda7e
    
    The bad code:
    proc ::yaml::_parsePlainScalarInBlock {base {loop 0}} {
        if {$loop == 5} { return }
    
    The code appears to still be present in the current git:
    https://core.tcl-lang.org/tcllib/blame?filename=modules/yaml/yaml.tcl&checkin=5be206c63f7681c9
    
    I think the tests may have strings short enough not to expose the bug.
    
    Example testcase:
    % set str {my_thing:
      one
      two
      three
      four
      five
      six}
    % puts [::yaml::yaml2dict $str]
    my_thing {one two three four five}
    
  5. foundin changed to: "latest"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "e88cafe169293ede9723368192937e2211e6d2ea"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "None"
  15. title changed to:
    ::yaml::_parsePlainScalarInBlock only parses the first 5 lines of a plain scalar
    
  16. type changed to: "Bug"