Skip to content
Tcl Source Code History Of Ticket 697b1bbfe3
Login

History Of Ticket 697b1bbfe3

Artifacts Associated With Ticket 697b1bbfe3

  1. Ticket change [834398468f] (rid 204374) by erikleunissen on 2022-09-18 11:30:05:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      Here are the results of six invocations of the "regexp" command.
      They indicate incorrect argument handling.
      
      
      % set str "a-z"
      a-z
      % regexp - $str; #1
      bad option "-": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --
      % regexp \- $str; #2
      1
      % regexp {-} $str; #3
      bad option "-": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --
      % regexp -\\ $str; #4
      couldn't compile regular expression pattern: invalid escape \ sequence
      % regexp \\- $str; #5
      1
      % set initstring "-"
      -
      % regexp $initstring $str; #6
      1
      %
      
      This discussion thread at c.l.t. provides some clues:
      
          https://groups.google.com/g/comp.lang.tcl/c/pbqqj8tcIUk
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "erikleunissen"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "erikleunissen"
    13. subsystem initialized to: "18. Commands M-Z"
    14. title initialized to: "Incorrect argument handling by [regexp]"
    15. type initialized to: "Bug"
  2. Ticket change [ae26d49811] (rid 257538) by serhiy.storchaka on 2026-10-10 21:12:12:

    1. icomment:
      Still the same in 8.6, 9.0 and 9.1. Cases #1, #3 and #5 are correct: an argument starting with "-" is taken as an option unless it follows <tt>--</tt>. #2 and #4 differ from the command only in compiled code: the bytecode compiler checked for a leading "-" only in words without backslashes, so <tt>\-</tt> and <tt>-\\</tt> were compiled as patterns. #6 (a pattern in a variable) is the same problem as [1902890fff].
      
      Proposed fix for #2 and #4 in branch [/timeline?r=regexp-compile-dash-pattern|regexp-compile-dash-pattern]: the compiler checks the value of any word known at compile time, as for <tt>regsub</tt>, so both now give "bad option" as in #1. Tests regexpComp-24.12 to 24.15.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [cc6ba518d4] (rid 257539) by serhiy.storchaka on 2026-10-10 21:12:29:

    1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
    2. login: "serhiy.storchaka"
  4. Ticket change [c78524a5f0] (rid 257563) by serhiy.storchaka on 2026-10-11 07:39:52:

    1. icomment:
      Proposed fix for case #6 in branch [/timeline?r=regexp-compile-runtime-switch|regexp-compile-runtime-switch], see [1902890fff].
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [15facf6005] (rid 261313) by dkf on 2026-11-08 20:53:27:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. subsystem changed to: "43. Regexp"
  6. Ticket change [3e0e8a1136] (rid 261887) by jan.nijtmans on 2026-11-18 17:42:21:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      Fixed in [6e93204003|trunk] and core-9-0-branch
      
      Many thanks!
      
      Would be nice to backport this to 8.6.19 as well.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Fixed"
    6. status changed to: "Pending"
  7. Ticket change [3afa410f3b] (rid 261913) by serhiy.storchaka on 2026-11-18 18:27:58:

    1. icomment:
      Backported to core-8-6-branch: [b0610ccd6f]. In 8.6, <tt>regexp \- a-z</tt> reports "bad option" instead of 9.0's "ambiguous option", compiled and uncompiled alike, so regexpComp-24.12 expects that.
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  8. Ticket change [5e808a5aa2] (rid 261917) by serhiy.storchaka on 2026-11-18 18:32:47:

    1. closedate changed to: "2461363.272776770872"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"