Tcl Source Code

Check-in [75186ea1b1]
Login

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

Overview
Comment:3394654, 3393276 Revise FlushChannel() to account for the possibility that the ChanWrite() call might recycle the buffer out from under us.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 75186ea1b1fd6b6a25732ea9e8ddd6fcb5b97a50
User & Date: dgp 2011-08-19 19:07:17
Context
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
16:05
Preserve the chanPtr during FlushChannel so that channel drivers don't yank it away before we're don... check-in: 9b67637699 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: Preserve the chanPtr during FlushChannel so that
	channel drivers don't yank it away before we're done with it.

2011-08-19  Alexandre Ferrieux  <[email protected]>

	* generic/tclTest.c: [Bug 2981154] async-4.3 segfault.

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
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.

2011-08-19  Alexandre Ferrieux  <[email protected]>

	* generic/tclTest.c: [Bug 2981154] async-4.3 segfault.

Changes to generic/tclIO.c.

2506
2507
2508
2509
2510
2511
2512

2513

2514
2515
2516
2517
2518
2519
2520

	    DiscardOutputQueued(statePtr);
	    continue;
	} else {
	    wroteSome = 1;
	}


	bufPtr->nextRemoved += written;


	/*
	 * If this buffer is now empty, recycle it.
	 */

	if (IsBufferEmpty(bufPtr)) {
	    statePtr->outQueueHead = bufPtr->nextPtr;







>
|
>







2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522

	    DiscardOutputQueued(statePtr);
	    continue;
	} else {
	    wroteSome = 1;
	}

	if (!IsBufferEmpty(bufPtr)) {
	    bufPtr->nextRemoved += written;
	}

	/*
	 * If this buffer is now empty, recycle it.
	 */

	if (IsBufferEmpty(bufPtr)) {
	    statePtr->outQueueHead = bufPtr->nextPtr;