Tcl Source Code

Check-in [1c1952f439]
Login

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

Overview
Comment:3607372 Correct literal refcounting.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3607372
Files: files | file ages | folders
SHA1: 1c1952f43913313b86b10abb2d0f496af3d3535c
User & Date: dgp 2013-03-08 21:14:07
Context
2013-03-11
12:55
3607246,3607372 Unbalanced refcounts of literals in the global literal table. check-in: c440d13b97 user: dgp tags: trunk
2013-03-08
21:14
3607372 Correct literal refcounting. Closed-Leaf check-in: 1c1952f439 user: dgp tags: bug-3607372
2013-03-07
21:16
Correct unbalanced effect of TclInvalidateCmdLiteral() on the refcounts of literals in the global ta... Closed-Leaf check-in: 03fa2a45da user: dgp tags: bug-3607246
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCompile.c.

2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
	     * the intrep.
	     */
	    int numBytes;
	    const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);

	    codePtr->objArrayPtr[i] = Tcl_NewStringObj(bytes, numBytes);
	    Tcl_IncrRefCount(codePtr->objArrayPtr[i]);
	    Tcl_DecrRefCount(objPtr);
	} else {
	    codePtr->objArrayPtr[i] = fetched;
	}
    }

    p += TCL_ALIGN(objArrayBytes);	/* align exception range array */
    if (exceptArrayBytes > 0) {







|







2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
	     * the intrep.
	     */
	    int numBytes;
	    const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);

	    codePtr->objArrayPtr[i] = Tcl_NewStringObj(bytes, numBytes);
	    Tcl_IncrRefCount(codePtr->objArrayPtr[i]);
	    TclReleaseLiteral((Tcl_Interp *)iPtr, objPtr);
	} else {
	    codePtr->objArrayPtr[i] = fetched;
	}
    }

    p += TCL_ALIGN(objArrayBytes);	/* align exception range array */
    if (exceptArrayBytes > 0) {