Skip to content
Tcl Source Code History Of Ticket 3414754fffffffff
Login

History Of Ticket 3414754fffffffff

Artifacts Associated With Ticket 3414754fffffffff

  1. Ticket change [8a504cc77e] (rid 127372) by strykaas on 2011-09-27 22:48:02:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Reproduced on WinXP SP3 with ActiveState 8.4 and 8.6 and Ubuntu 11.04 Tcl 8.5
      
      The following code produces unexpected results :
      
      ########################"
      # Bug #1 : why $foo1 != $foo2 !?
      cd /tmp
      
      set foo1 [file join [pwd] foo/]
      set foo2 [file join /tmp   foo/]
      
      puts "foo1=*$foo1*"
      puts "foo2=*$foo2*"
      
      # Bug #2 : why normalize works differently for the same actual string !?
      
      set fooFromStr "/tmp/foo/"
      if { $foo1 eq $fooFromStr } {
      puts "Yes, I'm not crazy, foo1 eq fooFromStr !"
      }
      puts "norm foo1  =*[file normalize $foo1     ]*"
      puts "normFormStr=*[file normalize $fooFromStr]*"
      ########################"
      
      Outputs is :
      
      foo1=*/tmp/foo/*
      foo2=*/tmp/foo*
      Yes, I'm not crazy, foo1 eq fooFromStr !
      norm foo1  =*/tmp/foo/*
      normFormStr=*/tmp/foo*
      
      There is two problems :
      1.There is no reason why [file join] would return different strings when the same parameter is passed two different ways.
      2.There is no reason why two identical strings would produce different results when [file normalize] is called with them as parameters.
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5.10"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "strykaas"
    10. subsystem initialized to: "37. File System"
    11. title initialized to: "file join/normalize bugs violate EIAS"
    12. type initialized to: "Bug"
  2. Ticket change [e2171c71ef] (rid 87564) by strykaas on 2011-09-28 05:49:17:

    1. priority changed to: "9 Immediate"
    2. resolution changed to: "Accepted"
  3. Ticket change [ce3b2edbf1] (rid 96018) by avl42 on 2011-09-28 13:51:04:

    1. icomment:
      FWIW, with Tcl 8.5.8 I can reproduce only the second (about file normalize), but not the first (both have trailing slash)
      
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"
  4. Ticket change [1d68ecc8c1] (rid 90798) by dkf on 2011-09-28 16:04:48:

    1. icomment:
      The tip of the trunk can't reproduce Bug#1 either.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [12624d5565] (rid 95295) by dgp on 2011-09-28 18:21:57:

    1. assignee changed to: "dgp"
    2. priority changed to: "5 Medium"
  6. Ticket change [ebc5329880] (rid 103588) by avl42 on 2011-09-28 19:19:39:

    1. icomment:
      Bug#1 is even more strange:
        $ cat testfile.tcl
        cd /tmp
        puts [info patchlevel]
        puts "pwd:[file join [pwd] foo/]"
        puts "/tmp:[file join /tmp  foo/]"
        $ tclsh8.5 testfile.tcl 
        8.5.8
        pwd:/tmp/foo/
        /tmp:/tmp/foo
        $ tclsh8.5 < testfile.tcl
        8.5.8
        pwd:/tmp/foo/
        /tmp:/tmp/foo/
      
      Just in case that SF hoses the formatted text: I make a small script that does cd, and then 
      puts for the two file join lines.  If I start tclsh8.5 with the script as an argument, then the bug
      shows up, however if I merely redirect tclsh8.5's stdin from the script, then both variants
      of file join do show the trailing slash.
      
      
      
      
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"
  7. Ticket change [6f0c77d0cd] (rid 100244) by avl42 on 2011-09-28 19:24:44:

    1. icomment:
      PS: my previous comment also applies to tclsh8.6b2 produced from the thusly-versioned official tarball.
      
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"
  8. Ticket change [488450e399] (rid 99898) by ralfixx on 2011-09-28 20:33:28:

    1. icomment:
      Seems related:
      
      $ tclsh8.5 
      % info patchlevel
      8.5.8
      % cd /tmp
      % set foo1 [file join [pwd] foo/]
      /tmp/foo/
      % file normalize $foo1
      /tmp/foo/
      % string length $foo1
      9
      % file normalize $foo1
      /tmp/foo
      
      Note how the result of "file normalize" changes after taking the "string length" of foo1.
      
      
      
    2. login: "ralfixx"
    3. mimetype: "text/plain"
    4. username: "ralfixx"
  9. Ticket change [8813aeec19] (rid 131808) by dgp on 2011-09-28 20:38:01:

    1. icomment:
      
      1) Testing results on 8.5.8 are not really
          very interesting.  8.5.10 or later please.
      
      2) Yes, it's clear that [file normalize] operates
      differently on different intreps, and that's a bug
      that needs fixing.  We don't need more script
      variants provoking shimmering to demo that.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [0e16501853] (rid 94548) by avl42 on 2011-09-28 21:33:54:

    1. icomment:
      @dgp:
      1) Did you miss the test report for 8.6b2 which I posted?
      
      Btw., 8.5.8 is what is installed on Ubuntu 10.10, maybe thus its popularity...
      
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"
  11. Ticket change [d586623415] (rid 123639) by strykaas on 2011-09-29 04:26:14:

    1. icomment:
      Indeed, the problem depicted here is visible if the provided code is sourced (i.e. code not typed directly within a tcl shell). That is probably why the two first comments state bug #1 is not reproducible.
      
      
      
      
    2. login: "strykaas"
    3. mimetype: "text/plain"
    4. username: "strykaas"
  12. Ticket change [d056793a0f] (rid 113158) by dgp on 2011-10-06 02:06:17:

    1. icomment:
      
      An experimental branch fixes this by
      eliminating the buggy intrep. See
      http://core.tcl.tk/tcl/timeline?r=remove-pathappend-intrep
      
      This needs testing to determine whether it
      has unacceptable performance impacts.  Also,
      it causes these test failures:
      
      ==== filename-13.1 globbing with brace substitution FAILED
      ==== Contents of test case:
      
          glob globTest/\{\}
      
      ---- Result was:
      globTest
      ---- Result should have been (exact matching):
      globTest/
      ==== filename-13.1 FAILED
      
      
      
      ==== filename-14.15 asterisks, question marks, and brackets FAILED
      ==== Contents of test case:
      
          lsort [glob globTest/*/]
      
      ---- Result was:
      globTest/a1 globTest/a2 globTest/a3
      ---- Result should have been (exact matching):
      globTest/a1/ globTest/a2/ globTest/a3/
      ==== filename-14.15 FAILED
      
      
      
      ==== filename-14.30 Bug 2710920 FAILED
      ==== Contents of test case:
      
          file rootname [lindex [lsort [glob globTest/*/]] 0]
      
      ---- Result was:
      globTest/a1
      ---- Result should have been (exact matching):
      globTest/a1/
      ==== filename-14.30 FAILED
      
      
      Where the results of a [glob] are actually
      tested to be sure they have the trailing /
      while the bug report here wants it dropped.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [ec0c09ffaf] (rid 103640) by dgp on 2011-10-06 02:39:58:

    1. icomment:
      
      A quick trial of this branch vs trunk on
      tclbench's file.bench reveals these
      apparent problems:
      
      007 FILE glob  tmpdir (60 entries)   262.35   137.62
      
      011 FILE glob / dirname              702.31   255.50
      
      014 FILE glob / extension            384.40   267.40
      
      020 FILE glob / rootname             385.44   285.91
      
      022 FILE glob / tail                 565.95   255.27
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  14. Ticket change [6a77bda50e] (rid 128153) by dgp on 2011-10-06 02:42:26:

    1. icomment:
      
      Not everything is slower though.
      
      009 FILE glob / atime                718.00   744.44
      012 FILE glob / executable           694.96   714.80
      013 FILE glob / exists               693.88   714.44
      015 FILE glob / isdirectory          719.39   741.74
      016 FILE glob / isfile               720.11   740.94
      017 FILE glob / mtime                717.75   746.52
      018 FILE glob / owned                744.35   768.85
      019 FILE glob / readable             696.89   713.09
      021 FILE glob / size                 723.59   746.08
      023 FILE glob / writable             697.59   712.37
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [d11fa90bee] (rid 113296) by dgp on 2011-10-07 03:34:00:

    1. icomment:
      experimental branch now passes all tests.
      No significant change to the file.bench results.
      
      The problematic benchmark, it seems to me,
      is 007 in the number below which suggests that
      a basic
      
        glob -nocomplain -directory $dir *
      
      operation on a directory with 60 entries
      (30 file, 30 subdits) is twice as slow
      after this change.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [9e91aee2dd] (rid 96491) by strykaas on 2011-10-07 05:15:02:

    1. icomment:
      Thanks dgp for trying to fix the issue. What is the actual status of your fix ? It is obviously unacceptable to take such a performance hit, although the language would be more sane. Maybe a more elaborate fix could avoid that ?
      
      
    2. login: "strykaas"
    3. mimetype: "text/plain"
    4. username: "strykaas"
  17. Ticket change [7c5229812e] (rid 97065) by dgp on 2011-10-13 01:50:25:

    1. icomment:
      
      Everytime I'm forced to dive into tclPathObj.c, it's
      to construct a "more elaborate patch".  And everytime
      I rant that life would be so much easier if we just trashed
      all this complexity.  Finally got ticked off enough to try it
      this time.  At least now we know what good it does.
      
      It's not all that hard for me to come up with a "more elaborate"
      patch that will work resolving the reported issue.
      
      It's much much harder for me to come with the patch that
      fixes the issue that I also have string confidence will not
      introduce a new cluster of bugs at the same time.  that's what
      will hold me back.  The code is just that tangled.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  18. Ticket change [5a262535cc] (rid 118090) by dgp on 2011-10-27 21:04:27:

    1. icomment:
      See branch bug-3414754 for proposed fix.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  19. Ticket change [338f186d12] (rid 106615) by dgp on 2011-10-27 22:17:25:

    1. icomment:
      Test added.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  20. Ticket change [70ad36cdda] (rid 100526) by dgp on 2011-10-27 22:18:11:

    1. icomment:
      
      Before I merge to a release branch, I need
      a report of a successful test on Windows to
      be sure I've not broken something terribly there.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  21. Ticket change [69b7434e90] (rid 103300) by dgp on 2011-10-28 08:09:25:

    1. assignee changed to: "mistachkin"
    2. closedate changed to: "2011-10-28T01:09:25"
    3. closer changed to: "dgp"
    4. icomment:
      Joe, can I trouble you to test this branch
      on Windows?  Thanks!
      
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. status changed to: "Pending"
    8. username: "dgp"
  22. Ticket change [c1a71a58d4] (rid 111355) by dgp on 2011-10-28 21:50:07:

    1. assignee changed to: "nijtmans"
    2. icomment:
      
      Jan, is this a test you can run?  I'm holding
      back 8.5.11RC generation until I see whether
      this bug fix is fit for merging into it.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  23. Ticket change [055d9514eb] (rid 89054) by nijtmans on 2011-10-29 14:23:19:

    1. assignee changed to: "dgp"
    2. icomment:
      Ran the test on Windows 7, with both mingw
      and Visual Studio 10.
      
      Looks OK to me, yes I wouls merge this.
      
      The only thing I encoungered was a test
      failure in filesystem-1.3 and filesystem-1.4
      (see bug 3075027, the other failures
      mentioned there are solved already),
      but those two tests are already failing
      for ages, I would not hold 8.5.11 for it.
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  24. Ticket change [b75cc41c38] (rid 125576) by dgp on 2011-11-01 00:10:09:

    1. closedate changed to: "2011-10-31T17:10:09"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      fix committed for 8.5.11 and 8.6b3
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"