Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-07-17
05:50 • Ticket [886457ffff] mode of transforms does not restrict channel ops status ... artifact: 8d1c938755 user: andreas_kupries
05:49 • Ticket [886457ffff]: 5 changes artifact: d6e06b205a user: andreas_kupries
2004-01-29
03:05 • Ticket [886457ffff]: 1 change artifact: a3aeaf9efc user: marcomaggi
2004-01-28
20:04 • New ticket [886457ffff]. artifact: da72b6bdd9 user: marcomaggi

mode of transforms does not restrict channel ops

Open886457ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2004-01-28 20:04:10
When a transformation is registered, its open mode is
validated
against  the open mode of the underlying channel  by
Tcl_StackChannel(). The transformation's open mode is not
registered in the stack state. 

When a transformation is registered with RDONLY mode on top
of a RDWR channel, its output function is invoked when an
attempt to  write data  is performed; analogue
behaviour is found
when a  transformation  is registered with WRONLY mode
on top
of a RDWR channel. 

The fact that the responsibility to disallow the
operation is
delegated to the transformation's driver is not stated
in the
manual pages.
marcomaggi Ticket [886457ffff]: 1 change [History diff]2004-01-29 03:05:07
andreas_kupriesplain2004-07-17 05:49:29
Logged In: YES 
user_id=75003

This problem still exists for 8.4.6, and the head as well.

To me this is more a bug in the code than in the
documentation. The RW-mode is listed in the common state
structure (part of the flags), and not changed based upon
the transformation. It should be, and each transformation
should save the underlying RW mode in its personal channel
structure, set the common mode, and restore the old mode
when unstacked. ... The private channel structure would have
to change, would be larger.
andreas_kupries Ticket [886457ffff]: 1 change [History diff]2004-07-17 05:50:21
Log in (anonymous is fine) to add a comment.