Tcl Source Code

Check-in [08b1cf9ec5]
Login

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

Overview
Comment:3393279, 3393280 ReflectClose(.) is missing Tcl_EventuallyFree() calls at some of its exits.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 08b1cf9ec5a0b5350d3d76c576bd6f3be490cefe
User & Date: dgp 2011-08-19 20:27:48
Context
2011-08-22
10:19
merge-mark check-in: 656a0bd6af user: jan.nijtmans tags: trunk
10:18
Merge to feature branch check-in: 094a3c09ef user: jan.nijtmans tags: tip-388-impl
2011-08-19
20:27
3393279, 3393280 ReflectClose(.) is missing Tcl_EventuallyFree() calls at some of its exits. check-in: 08b1cf9ec5 user: dgp tags: trunk
19:07
3394654, 3393276 Revise FlushChannel() to account for the possibility that the ChanWrite() call migh... check-in: 75186ea1b1 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1



2
3
4
5
6
7
8
2011-08-19  Don Porter  <[email protected]>




	* generic/tclIO.c: [Bugs 3394654, 3393276] Revise FlushChannel() to
	account for the possibility that the ChanWrite() call might recycle
	the buffer out from under us.

	* generic/tclIO.c: Preserve the chanPtr during FlushChannel so that
	channel drivers don't yank it away before we're done with it.

>
>
>







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

	* generic/tclIORTrans.c: [Bugs 3393279, 3393280] ReflectClose(.) is
	missing Tcl_EventuallyFree() calls at some of its exits.

	* generic/tclIO.c: [Bugs 3394654, 3393276] Revise FlushChannel() to
	account for the possibility that the ChanWrite() call might recycle
	the buffer out from under us.

	* generic/tclIO.c: Preserve the chanPtr during FlushChannel so that
	channel drivers don't yank it away before we're done with it.

Changes to generic/tclIORTrans.c.

936
937
938
939
940
941
942

943
944
945
946
947
948
949
950

951
952
953
954
955
956
957
     * that check is not necessary. We always go through 'finalize'.
     */

    if (HAS(rtPtr->methods, METH_DRAIN) && !rtPtr->readIsDrained) {
	int errorCode;

	if (!TransformDrain(rtPtr, &errorCode)) {

	    return errorCode;
	}
    }

    if (HAS(rtPtr->methods, METH_FLUSH)) {
	int errorCode;

	if (!TransformFlush(rtPtr, &errorCode, FLUSH_WRITE)) {

	    return errorCode;
	}
    }

    /*
     * Are we in the correct thread?
     */







>








>







936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
     * that check is not necessary. We always go through 'finalize'.
     */

    if (HAS(rtPtr->methods, METH_DRAIN) && !rtPtr->readIsDrained) {
	int errorCode;

	if (!TransformDrain(rtPtr, &errorCode)) {
	    Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform);
	    return errorCode;
	}
    }

    if (HAS(rtPtr->methods, METH_FLUSH)) {
	int errorCode;

	if (!TransformFlush(rtPtr, &errorCode, FLUSH_WRITE)) {
	    Tcl_EventuallyFree (rtPtr, (Tcl_FreeProc *) FreeReflectedTransform);
	    return errorCode;
	}
    }

    /*
     * Are we in the correct thread?
     */