Skip to content
Tcl Source Code Artifact [275372479d]
Login

Artifact [275372479d]

Artifact 275372479d3e59d821e5e784f6ac3f303e2ee344:

Ticket change [275372479d] - New ticket [2826248fffffffff|2826248fff] <i>Redirecting to a ref chan results in a seg fault</i>. by andy22286 on 2009-07-23 22:17:13.
D 2009-07-23T22:17:13
J assignee andreas_kupries
J cmimetype text/plain
J comment When\susing\sa\sref\schan\sas\spart\sof\san\s[exec]\scommand,\son\sredirection\sto\sthe\schannel\sfrom\sanother\ssubprocess,\sa\ssegmentation\sfault\soccurs.\s\sThis\sis\sdue\sto\sa\sNULL\sfunction\spointer,\sas\sdetailed\sbelow.\s\sSee\sattached\sfor\ssample\sscript\sand\sassociated\svalgrind\serror\sreport.\n\nAs\sstated\sby\saku,\n\nakuTclpMakefile\s(tclUnixPipe)\scalls\sTcl_GetChannelHandle\s(tclIO),\sthis\sruns\s->getHandleProc.\sThis\sis\sNULL\sfor\sreflected\schannels.\nakuAccording\sto\smy\scomment\sin\stclIORChan.c\sthis\sgetHandleProc\sshould\sbe\sNULL'able,\si.e.\sNULL\sallowed.\sSeems\snot.\sOr\ssome\scheck\sis\smissing\ssomewhere.\nakuright,\stcl.h\ssays\sthe\ssame,\sgetHandleProc\scan\sbe\sset\sto\sNULL\sif\snot\ssupported.\nakuThat\smeans\sany\schannel\stype\swithout\sgetHandleProc\swill\scrash\s'exec'\sand\s'open|'\swhen\susing\sa\schanel\sof\sthat\stype.\n\nakuso,\swe\shave\sto\sadd\sa\sNULL\scheck\sin\sTcl_GetChannelHandle,\sand\sreturn\sTCL_ERROR\sif\sthis\soccurs.\n\nakuI\swill\slikely\shave\sto\sdo\ssome\sother\sthings\saround\sthis\sto\sget\sa\snice\serror\smessage.\sThe\sstandard\smessage\swill\sjust\sclaim\s'not\sopened\sfor\sreading\sor\swriting',\swhich\sis\sbogus\sfor\sthis\scase.
J foundin obsolete:\s8.6b1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter andy22286
J subsystem 24.\sChannel\sCommands
J title Redirecting\sto\sa\sref\schan\sresults\sin\sa\sseg\sfault
J type Bug
K 2826248fffffffffffffffffffffffffffffffff
U andy22286
Z 0f81ba5636b64aaa369c142d11644805