Test fileSystem-7.2 segfaults on both
Solaris 8 and Linux/Alpha during the
[file copy] command.
If this test is meant to demo the crash,
it should be marked with a suitable
constraint.
I also note that the test uses [info script].
Unless the test is testng something in particular
about [info script], that is a bad idea, as
it complicates interactive testing.
Instead, if the test just needs a file to
work with, use the [makeFile] and
[removeFile] commands.
Also, It appears that the value of $dir
is incorrectly managed, at least if the
intent is to have the same working directory
after the test as before.
Logged In: YES
user_id=32170
Could you provide a stack trace?
I can certainly clean up the [info script]/$dir usage.
Logged In: YES
user_id=80530
Here's the top of the stack:
#0 ResetObjResult (iPtr=0x0) at ./../generic/tclResult.c:830
#1 0x1200c6f70 in Tcl_ResetResult (interp=0x0) at
./../generic/tclResult.c:792
#2 0x120096cc0 in CopyData (csPtr=0x1203195f0, mask=0)
at ./../generic/tclIO.c:7744
#3 0x120096414 in TclCopyChannel (interp=0x0,
inChan=0x1202f8de0,
outChan=0x1202fc870, toRead=-1, cmdPtr=0x0) at
./../generic/tclIO.c:7482
#4 0x1200a29f4 in TclCrossFilesystemCopy (interp=0x0,
source=0x1202fb0c0,
target=0x120308ae0) at ./../generic/tclIOUtil.c:3532
#5 0x12001e300 in SimpleCopy (interp=0x0, pathPtr=0x1202f57d0)
at ./../generic/tclTest.c:6103
#6 0x12001e54c in SimpleStat (pathPtr=0x1202f57d0,
bufPtr=0x11fff98f0)
at ./../generic/tclTest.c:6159
#7 0x12009facc in Tcl_FSLstat (pathPtr=0x1202f57d0,
buf=0x11fff98f0)
at ./../generic/tclIOUtil.c:1633
#8 0x12007c890 in CopyRenameOneFile (interp=0x12022ede0,
source=0x1202f57d0,
target=0x1202fdb80, copyFlag=1, force=0) at
./../generic/tclFCmd.c:473
#9 0x12007bd3c in FileCopyRename (interp=0x12022ede0, objc=4,
objv=0x11fffa540, copyFlag=1) at ./../generic/tclFCmd.c:165
#10 0x12007ba80 in TclFileCopyCmd (interp=0x12022ede0, objc=4,
objv=0x11fffa540) at ./../generic/tclFCmd.c:85
#11 0x120032a04 in Tcl_FileObjCmd (dummy=0x0,
interp=0x12022ede0, objc=4,
objv=0x11fffa540) at ./../generic/tclCmdAH.c:876
#12 0x12002821c in TclEvalObjvInternal (interp=0x12022ede0,
objc=4,
objv=0x11fffa540,
command=0x1202ed08f " file copy simplefs:/[file tail
[info script]] theCo
py\n testsimplefilesystem 0\n set newtime [file mtime
theCopy]\n file d
elete theCopy\n cd $dir\n expr {$origtime ==
$newtime}\n", length=58,
flags=0) at ./../generic/tclBasic.c:3076
It appears that the routine SimpleCopy() which claims to be
able to accept NULL for its interp argument, eventually
passes interp down to other routines that expect it to
be non-NULL.
Logged In: YES
user_id=124643
Adding this at the beginning of SimpleCopy() prevents the crash
from happening, but I am not sure whether it is a good fix
or not:
if (!simpleInterpPtr)
simpleInterpPtr = Tcl_CreateInterp();
Logged In: YES
user_id=32170
I have a fix for this now, that I'll check in asap. Please
test in about 10 minutes!