Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Segfault when open fails with "b" (binary) flag specified

Closed / Fixed2949740fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-02-11 14:56:41
open "|something-nonexistent" rb
=> Segmentation fault

The cause is that Tcl_SetChannelOption is called to set up binary translation, _without_ checking for success, and when [open] fails, NULL channel is passed into this function.

A trivial patch fixing this (one of possible variants, not necessary of the best code style) is attached.
a_kovalenkoplain2010-02-11 21:56:41
File Added - 362522: tcl-openrb-fail-segfault.patch
dkfplain2010-02-11 22:26:56
allow_comments - 1

Was trivial to fix (and a silly error).
dkf Ticket [2949740fff]: 1 change [History diff]2010-02-11 22:27:09
Log in (anonymous is fine) to add a comment.

Attachments: