.
D 2004-10-17T16:36:45
J assignee vincentdarley
J cmimetype text/plain
J comment FileCopyRename\sat\s../generic/tclFCmd.c:539\scalls\nTcl_FSFileAttrsSet(NULL,\s2,\starget,\sperm),\spassing\sa\nNULL\sTcl_Interp*\sinto\sthe\sset\sattr\scommand\s(presumably\nbecause\sthe\srename\sis\sbeing\sperformed\sen\spassant)\n\nHowever,\sNativeFileAttrsSet()\swhich\sis\sthe\sdefault\sfor\nnormal\sfile\ssystems\s(and\sother\sset\sattribute\shandlers),\ncan\sget\serrors\s-\sin\smy\scase\sin\sSetPermissionsAttribute\nat\s../unix/tclUnixFCmd.c:1480,\swhere\sa\sposix\serror\noccurs,\sand\sthe\scode\scalls\sTcl_PosixError(interp).\n\nThe\supshot\sis\sthat\sTcl_PosixError\stries\s(eventually)\sto\nset\serrorCode\sand\sthis\sfails\sbecause\sthere\sis\sno\ninterpreter\s(or,\srather,\sa\sNULL\sinterpreter)\sfor\sit\sto\nset\sthe\svariable\sin.\n\nYou\scan\sreproduce\sthis\sby\screating\sa\spair\sof\sfiles,\sA\nand\sB,\sowned\sby\sanother\suser\sand\s(at\sleast\sin\smy\scase)\nchmod\su=rw,g=r,o=r\n\nThen,\sin\stclsh8.5:\s\sfile\srename\s-force\sA\sB\n\nIt\sSIGSEGVs\sbecause\sof\sthe\sNULL\sinterpreter.\n\nI\ssuggest\sthat\sthe\spractice\sof\spassing\sNULL\sinterp\sinto\nfunctions\swhich\scould\sgenerate\serrors\sis\salways\sbad,\nand\sin\sthis\scase\sat\sleast\sthe\scall\sto\nTcl_FSFileAttrsSet\sshould\spass\sin\sthe\svariable\sinterp,\nand\snot\sNULL.\n
J foundin obsolete:\s8.5a2
J priority 7\sHigh
J resolution None
J status Open
J submitter coldstore
J subsystem 37.\sFile\sSystem
J title SIGSEGV\son\sfile\srename\swhen\suser\sdoesn't\sown\sfile
J type Bug
K 1048733fffffffffffffffffffffffffffffffff
U coldstore
Z 2989f8cce7f56c5a14a1846f481444f8