Tcl Source Code

Check-in [fdae4b6a83]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Leak of ReflectedTransformMap.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | mistake
Files: files | file ages | folders
SHA1: fdae4b6a83eb29e10d839a967f513bf76c6e7d05
User & Date: dgp 2011-08-24 16:06:14
Context
2011-08-24
16:06
Leak of ReflectedTransformMap. Closed-Leaf check-in: fdae4b6a83 user: dgp tags: mistake
2011-08-23
16:58
typo check-in: ee5a20b8a0 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.





1
2
3
4
5
6
7




2011-08-23  Don Porter  <[email protected]>

	* generic/tclIORChan.c:	[Bug 3396948] Leak of ReflectedChannelMap.

2011-08-23  Jan Nijtmans  <[email protected]>

	* generic/tclStringObj.c: [FRQ 3396731] inline string reverse
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
2011-08-24  Don Porter  <[email protected]>

	* generic/tclIORTrans.c: Leak of ReflectedTransformMap.

2011-08-23  Don Porter  <[email protected]>

	* generic/tclIORChan.c:	[Bug 3396948] Leak of ReflectedChannelMap.

2011-08-23  Jan Nijtmans  <[email protected]>

	* generic/tclStringObj.c: [FRQ 3396731] inline string reverse

Changes to generic/tclIORTrans.c.

2187
2188
2189
2190
2191
2192
2193

2194
2195
2196
2197
2198
2199
2200
	resultPtr->evPtr = NULL;
	resultPtr->result = TCL_ERROR;

	ForwardSetStaticError(paramPtr, msg_send_dstlost);

	Tcl_ConditionNotify(&resultPtr->done);
    }


    /*
     * Get the map of all channels handled by the current thread. This is a
     * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go
     * through the channels and remove all which were handled by this
     * interpreter. They have already been marked as dead.
     */







>







2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
	resultPtr->evPtr = NULL;
	resultPtr->result = TCL_ERROR;

	ForwardSetStaticError(paramPtr, msg_send_dstlost);

	Tcl_ConditionNotify(&resultPtr->done);
    }
    Tcl_MutexUnlock(&rtForwardMutex);

    /*
     * Get the map of all channels handled by the current thread. This is a
     * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go
     * through the channels and remove all which were handled by this
     * interpreter. They have already been marked as dead.
     */
2211
2212
2213
2214
2215
2216
2217

2218
2219
2220
2221
2222
2223
2224
2225
2226
	     */

	    continue;
	}

	Tcl_DeleteHashEntry(hPtr);
    }


    Tcl_MutexUnlock(&rtForwardMutex);
#endif
}

#ifdef TCL_THREADS
/*
 *----------------------------------------------------------------------
 *







>

<







2212
2213
2214
2215
2216
2217
2218
2219
2220

2221
2222
2223
2224
2225
2226
2227
	     */

	    continue;
	}

	Tcl_DeleteHashEntry(hPtr);
    }
    ckfree(rtmPtr);


#endif
}

#ifdef TCL_THREADS
/*
 *----------------------------------------------------------------------
 *
2319
2320
2321
2322
2323
2324
2325

2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341

2342
2343
2344
2345
2346
2347
2348
2349
2350
	resultPtr->evPtr = NULL;
	resultPtr->result = TCL_ERROR;

	ForwardSetStaticError(paramPtr, msg_send_dstlost);

	Tcl_ConditionNotify(&resultPtr->done);
    }


    /*
     * Get the map of all channels handled by the current thread. This is a
     * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go
     * through the channels, remove all, mark them as dead.
     */

    rtmPtr = GetThreadReflectedTransformMap();
    for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch);
	    hPtr != NULL;
	    hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) {
	ReflectedTransform *rtPtr = Tcl_GetHashValue(hPtr);

	rtPtr->interp = NULL;
	Tcl_DeleteHashEntry(hPtr);
    }


    Tcl_MutexUnlock(&rtForwardMutex);
}

static void
ForwardOpToOwnerThread(
    ReflectedTransform *rtPtr,	/* Channel instance */
    ForwardedOperation op,	/* Forwarded driver operation */
    const void *param)		/* Arguments */







>
















>

<







2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345

2346
2347
2348
2349
2350
2351
2352
	resultPtr->evPtr = NULL;
	resultPtr->result = TCL_ERROR;

	ForwardSetStaticError(paramPtr, msg_send_dstlost);

	Tcl_ConditionNotify(&resultPtr->done);
    }
    Tcl_MutexUnlock(&rtForwardMutex);

    /*
     * Get the map of all channels handled by the current thread. This is a
     * ReflectedTransformMap, but on a per-thread basis, not per-interp. Go
     * through the channels, remove all, mark them as dead.
     */

    rtmPtr = GetThreadReflectedTransformMap();
    for (hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch);
	    hPtr != NULL;
	    hPtr = Tcl_FirstHashEntry(&rtmPtr->map, &hSearch)) {
	ReflectedTransform *rtPtr = Tcl_GetHashValue(hPtr);

	rtPtr->interp = NULL;
	Tcl_DeleteHashEntry(hPtr);
    }
    ckfree(rtmPtr);


}

static void
ForwardOpToOwnerThread(
    ReflectedTransform *rtPtr,	/* Channel instance */
    ForwardedOperation op,	/* Forwarded driver operation */
    const void *param)		/* Arguments */