Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 51d766a1e41e894c927c689b51508e0701f501fa
Ticket: 3565462fffffffffffffffffffffffffffffffff
Segmentation fault on linux 64 bit
User & Date: nijtmans on 2012-09-07 17:06:52
Changes

  1. assignee changed to: "nijtmans"
  2. closedate changed to: "2012-09-07T10:06:52"
  3. closer changed to: "nijtmans"
  4. icomment:
    > int socketfd;
    > if (Tcl_GetChannelHandle(channel, TCL_READABLE, (ClientData)&socketfd) != TCL_OK) {
    >         return TCL_ERROR;
    > }
    Casting a pointer to ClientData hides the compiler error that would
    have been generated otherwise. It's not safe to do something
    like that. Tcl_GetChannelHandle() is documented to return
    ClientData, not an int. Your code should look like:
    ClientData socketfd;
    if (Tcl_GetChannelHandle(channel, TCL_READABLE, &socketfd) != TCL_OK) {
            return TCL_ERROR;
    }
    So, I'm sorry to say it, but it's definitely not a Tcl bug.
    
    
  5. login: "nijtmans"
  6. mimetype: "text/plain"
  7. resolution changed to: "Invalid"
  8. status changed to: "Closed"
  9. username: "nijtmans"