Tcl Source Code

Check-in [c12fa286f4]
Login

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

Overview
Comment:fix for [Bug 2662380], crash caused by appending to a variable with a write trace that unsets it
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: c12fa286f4de5145ad0f82acf6b41c5f204c4b07
User & Date: mig 2011-04-13 13:19:36
Context
2011-04-13
13:25
fix merge history check-in: 9a245919a3 user: mig tags: core-8-5-branch
13:23
fix for [Bug 2662380], crash caused by appending to a variable with a write trace that unsets it check-in: d58030af16 user: mig tags: trunk
13:19
fix for [Bug 2662380], crash caused by appending to a variable with a write trace that unsets it check-in: c12fa286f4 user: mig tags: core-8-5-branch
2011-04-12
20:04
Repair corruption in [string reverse] when string rep invalidation failed to also reset the bytes al... check-in: 4ab8a5f225 user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7





2011-04-12  Don Porter  <[email protected]>

	* generic/tclStringObj.c:	Repair corruption in [string reverse]
	* tests/string.test:	when string rep invalidation failed to also
	reset the bytes allocated for string rep to zero [Bug 3285472].

2011-04-12  Venkat Iyer <[email protected]>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2011-04-13  Miguel Sofer  <[email protected]>

	* generic/tclVar.c: fix for [Bug 2662380], crash caused by
	appending to a variable with a write trace that unsets it.

2011-04-12  Don Porter  <[email protected]>

	* generic/tclStringObj.c:	Repair corruption in [string reverse]
	* tests/string.test:	when string rep invalidation failed to also
	reset the bytes allocated for string rep to zero [Bug 3285472].

2011-04-12  Venkat Iyer <[email protected]>

Changes to generic/tclVar.c.

2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563

2564
2565
2566
2567
2568
2569
2570
	if (varPtr == NULL) {
	    return TCL_ERROR;
	}
	for (i=2 ; i<objc ; i++) {
	    /*
	     * Note that we do not need to increase the refCount of the Var
	     * pointers: should a trace delete the variable, the return value
	     * of TclPtrSetVar will be NULL, and we will not access the
	     * variable again.
	     */

	    varValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, objv[1],
		    NULL, objv[i], TCL_APPEND_VALUE|TCL_LEAVE_ERR_MSG, -1);
	    if (varValuePtr == NULL) {

		return TCL_ERROR;
	    }
	}
    }
    Tcl_SetObjResult(interp, varValuePtr);
    return TCL_OK;
}







|
|




|
>







2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
	if (varPtr == NULL) {
	    return TCL_ERROR;
	}
	for (i=2 ; i<objc ; i++) {
	    /*
	     * Note that we do not need to increase the refCount of the Var
	     * pointers: should a trace delete the variable, the return value
	     * of TclPtrSetVar will be NULL or emptyObjPtr, and we will not
	     * access the variable again.
	     */

	    varValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, objv[1],
		    NULL, objv[i], TCL_APPEND_VALUE|TCL_LEAVE_ERR_MSG, -1);
	    if ((varValuePtr == NULL) ||
		    (varValuePtr == ((Interp *) interp)->emptyObjPtr)) {
		return TCL_ERROR;
	    }
	}
    }
    Tcl_SetObjResult(interp, varValuePtr);
    return TCL_OK;
}