Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-06-23
22:48 • Closed ticket [1972879fff]: invalid pathname caching? plus 6 other changes artifact: 1a82831f8d user: dgp
22:34 • Ticket [1972879fff]: 4 changes artifact: 968cd1694d user: dgp
11:18 • Ticket [1972879fff]: 5 changes artifact: b91bca95f1 user: dgp
11:14 • Ticket [1972879fff]: 4 changes artifact: fe079ceb24 user: dgp
11:08 • Add attachment 1972879.patch to ticket [1972879fff] artifact: 49c5a6e86a user: dgp
11:08 • Ticket [1972879fff] invalid pathname caching? status still Open with 4 other... artifact: ecf2a9dd3b user: dgp
2008-06-22
11:54 • Ticket [1972879fff]: 4 changes artifact: 9d1f81c488 user: dgp
11:06 • Ticket [1972879fff]: 4 changes artifact: e5b33f835b user: dgp
2008-06-21
04:11 • Ticket [1972879fff]: 4 changes artifact: 11d43dba65 user: dgp
2008-06-17
03:11 • Ticket [1972879fff]: 2 changes artifact: d5e9e433ec user: dgp
2008-06-09
21:04 • Ticket [1972879fff]: 4 changes artifact: df31f1b79d user: patthoyts
20:45 • Ticket [1972879fff]: 4 changes artifact: 6ee8133431 user: msofer
20:43 • Ticket [1972879fff]: 4 changes artifact: 4ae06b7fee user: msofer
2008-05-27
22:05 • Ticket [1972879fff]: 4 changes artifact: a86781048a user: dgp
2008-05-26
20:16 • Add attachment uplevel.patch to ticket [1972879fff] artifact: 2f2c6dbd65 user: msofer
20:16 • Ticket [1972879fff] invalid pathname caching? status still Open with 4 other... artifact: 2b4091e03f user: msofer
13:16 • New ticket [1972879fff]. artifact: e697fa816d user: msofer

invalid pathname caching?

Closed / Fixed1972879fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 18 years ago
Descriptionplain2008-05-26 13:16:24
Bytecompiling [uplevel]ed scripts (see uplevel.patch below) causes filesystem-1.11 to fail.

This seems to be due to improper spoiling of some intrep when the value is stored as a literal? It looks similar to [Bug #1972867], but filesystem-1.11 test is not so easy to run in isolation (it relies on some previous tests having been run?).
msoferplain2008-05-26 20:16:25
File Added - 279078: uplevel.patch
dgpplain2008-05-27 22:05:15
Logged In: YES 
user_id=80530
Originator: NO


Any relation to 953284?
msoferplain2008-06-09 20:43:17
Logged In: YES 
user_id=148712
Originator: YES

That patch has been committed to HEAD now
msoferplain2008-06-09 20:45:00
Logged In: YES 
user_id=148712
Originator: YES

That patch has been committed to HEAD now
patthoytsplain2008-06-09 21:04:00
Logged In: YES 
user_id=202636
Originator: NO

Possibly the following from Windows XP are relevant:
==== filesystem-1.3 link normalisation FAILED
==== Contents of test case:

    testPathEqual [file normalize [file join dir.dir foo]]  [file normalize [file join dir.link foo]]

---- Result was:
not equal: C:/opt/tcl/src/kitgen/8.6/tcl/win/dir.dir/foo C:/opt/tcl/src/kitgen/8.6/tcl/win/dir.link/foo
---- Result should have been (exact matching):
1
==== filesystem-1.3 FAILED



==== filesystem-1.4 link normalisation FAILED
==== Contents of test case:

    testPathEqual [file normalize [file join dir.dir inside.file]]  [file normalize [file join dir.link inside.file]]

---- Result was:
not equal: C:/opt/tcl/src/kitgen/8.6/tcl/win/dir.dir/inside.file C:/opt/tcl/src/kitgen/8.6/tcl/win/dir.link/inside.file
---- Result should have been (exact matching):
1
==== filesystem-1.4 FAILED
dgp Ticket [1972879fff]: 2 changes [History diff]2008-06-17 03:11:12
dgpplain2008-06-21 04:11:51
Logged In: YES 
user_id=80530
Originator: NO

dgpthe difference is whether or not [file link] is compiled
dgpwhy that difference makes a difference is.... mysterious
dgpdrilling down, using [eval] on just the [file join .. dir2.link] part is enough.
dgpIck.  filesystem-1.11 depends on filesystem-1.10 ?
dgpThis is probably an actual bug
dgpcd ~
akuSeeing that I remember that one time somewhere I had to replace a [file join x y] with x/y, because the join command gave bogus results, and x/y didn't. Maybe because the latter forced everything through the string rep. Could of course be an unrelated problem in the path intrep. ... Found it
aku2007-08-08  Andreas Kupries  <[email protected]>

        * inplace.test: Fixed failures of some tests on Windows.

        * fileutil.tcl: Working around a possible bug in the handling of
          path intreps by the core, on Windows. See commentary in
          'fullnormalize', and 'find.setup' (f_setupcircle).
dgpplain2008-06-22 11:06:22
Logged In: YES 
user_id=80530
Originator: NO

dgpconfirmed that forcing a shimmer of the value {..} is sufficient to make test filesystem-1.11 pass again.
dgpso I bet the shared literal of that relative pathname is getting a full path cached in it
dgp...and since [pwd] hasn't changed, that's getting used in an improper way
dgpI fear this is wrapped up in an old debate about how [file link] is supposed to treat relative pathnames in the target value
dgpplain2008-06-22 11:54:59
Logged In: YES 
user_id=80530
Originator: NO


line 940, tclUnixFile.c
dgpplain2008-06-23 11:08:37
File Added - 282178: 1972879.patch

Logged In: YES 
user_id=80530
Originator: NO


here's the patch.
File Added: 1972879.patch
dgpplain2008-06-23 11:14:33
Logged In: YES 
user_id=80530
Originator: NO


Distributors of browsers that crash
deserve death.

I had a lengthy comment to accompany
that patch.  All lost when my attempt
to upload the patch file brought the
browser down.  I'm in no mood to duplicate
it now.

This fix is a hack to correct a bug
in Tcl_FSGetTranslatedPath.  It's not
elegant, but I think forcing us through
string reps at least gives us something
we know will work, without requiring me
to reverse engineer the whole "path"
Tcl_ObjType.

The code getting replaced by this
patch was simply wrong wrong wrong.
It forced a complete normalization of
the path, and the whole "point" of a
translated path is that it is an
expansion of ~ **without** forcing a
full normalization.  In particular,
a relative path was being coerced into
absolute form.

Others are welcome to contribute better
fix(es).
dgpplain2008-06-23 11:18:58
Logged In: YES 
user_id=80530
Originator: NO


committed to HEAD for 8.6a1.
needs backport.
dgpplain2008-06-23 22:34:18
Logged In: YES 
user_id=80530
Originator: NO


Sleep is good.  Better fix committed to HEAD.
dgpplain2008-06-23 22:48:07
Logged In: YES 
user_id=80530
Originator: NO


backporting complete.
Log in (anonymous is fine) to add a comment.

Attachments: