Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 21241ce9a0a5933aa0b5b4ec14f4e3834d475138555112060bfe105415ffba31
Ticket: 92564326a98b551099d3e61bbe88e3b5f9720c15
Open file descriptor leak: better align dir operations(opendir/readdir/closedir) all to either 64bit or 32bit ones.
User & Date: wrenashe on 2018-05-09 02:12:28
Changes

  1. closer changed to: "nobody"
  2. icomment:
    As the comments to "sebres added on 2018-05-08 10:02:04:"
    
    Sebres,
    
    Thanks for the prompt reply. I thought your fix was not completed one, you missed DIR/DIR64. I attached the partial patch based on my local 8.5.19 for your reference here(DIR to Tcl_Dir), the other two tclUnixFile.c and tclUnixFCmd.c files need a light update as well on where DIR is placed. I tag the bug with "rejected" and "pending" to drive the workflow.
    
    The changes to my local is built good on AIX and testing is passed.
    
    Index: tclUnixPort.h
    ===================================================================
    --- tclUnixPort.h	(revision 88561)
    +++ tclUnixPort.h	(working copy)
    @@ -59,10 +59,18 @@
     
     #ifdef HAVE_STRUCT_DIRENT64
     typedef struct dirent64	Tcl_DirEntry;
    +typedef DIR64			Tcl_Dir;
     #   define TclOSreaddir		readdir64
    +#   define TclOSopendir		opendir64
    +#   define TclOSrewinddir	rewinddir64
    +#   define TclOSclosedir	closedir64
     #else
     typedef struct dirent	Tcl_DirEntry;
    +typedef DIR		Tcl_Dir;
     #   define TclOSreaddir		readdir
    +#   define TclOSopendir		opendir
    +#   define TclOSrewinddir	rewinddir
    +#   define TclOSclosedir	closedir
     #endif
     
     #ifdef HAVE_TYPE_OFF64_T
    
  3. login: "wrenashe"
  4. mimetype: "text/plain"
  5. resolution changed to: "Rejected"
  6. status changed to: "Pending"