Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose int-rep was just purged. Required to prevent a dangling IndexRep* to reused, smashing the heap. See also the entries at 2011-04-16 and 2011-03-24 for the history of the problem. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | mistake |
Files: | files | file ages | folders |
SHA1: |
c39553c37050376ba0f194aecef94d6a |
User & Date: | andreask 2011-04-20 17:52:11 |
Original Comment: | (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose int-rep was just purged. Required to prevent a dangling IndexRep* to reused, smashing the heap. See also the entries at 2011-04-16 and 2011-03-24 for the history of the problem. |
References
2011-04-20
| ||
18:14 | Undo change [c39553c370]. Not needed, in head the TclFreeIntRep macro does the right thing. Closed-Leaf check-in: d66fb2fbf9 user: andreask tags: mistake | |
Context
2011-04-20
| ||
18:14 | Undo change [c39553c370]. Not needed, in head the TclFreeIntRep macro does the right thing. Closed-Leaf check-in: d66fb2fbf9 user: andreask tags: mistake | |
17:52 | (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose int-rep was just purged... check-in: c39553c370 user: andreask tags: mistake | |
17:51 | (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose int-rep was just purged... check-in: 20a3aedb2a user: andreask tags: core-8-5-branch | |
2011-04-19
| ||
16:41 | Reduce internals access in the implementation of [<foo>::pkgconfig list]. check-in: 5637694013 user: dgp tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2011-04-19 Don Porter <[email protected]> * generic/tclConfig.c: Reduce internals access in the implementation of [<foo>::pkgconfig list]. 2011-04-18 Don Porter <[email protected]> | > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 2011-04-20 Andreas Kupries <[email protected]> * generic/tclFCmd.c (TclFileAttrsCmd): Added commands to reset the typePtr of the Tcl_Obj* whose int-rep was just purged. Required to prevent a dangling IndexRep* to reused, smashing the heap. See also the entries at 2011-04-16 and 2011-03-24 for the history of the problem. 2011-04-19 Don Porter <[email protected]> * generic/tclConfig.c: Reduce internals access in the implementation of [<foo>::pkgconfig list]. 2011-04-18 Don Porter <[email protected]> |
︙ | ︙ |
Changes to generic/tclFCmd.c.
︙ | ︙ | |||
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | if (Tcl_GetIndexFromObj(interp, objv[0], attributeStrings, "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { TclFreeIntRep(objv[0]); } if (Tcl_FSFileAttrsGet(interp, index, filePtr, &objPtr) != TCL_OK) { goto end; } Tcl_SetObjResult(interp, objPtr); } else { | > | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | if (Tcl_GetIndexFromObj(interp, objv[0], attributeStrings, "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { TclFreeIntRep(objv[0]); objv[0]->typePtr = NULL; } if (Tcl_FSFileAttrsGet(interp, index, filePtr, &objPtr) != TCL_OK) { goto end; } Tcl_SetObjResult(interp, objPtr); } else { |
︙ | ︙ | |||
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | for (i = 0; i < objc ; i += 2) { if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { TclFreeIntRep(objv[i]); } if (i + 1 == objc) { Tcl_AppendResult(interp, "value for \"", TclGetString(objv[i]), "\" missing", NULL); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FATTR", "NOVALUE", NULL); goto end; | > | 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | for (i = 0; i < objc ; i += 2) { if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { TclFreeIntRep(objv[i]); objv[i]->typePtr = NULL; } if (i + 1 == objc) { Tcl_AppendResult(interp, "value for \"", TclGetString(objv[i]), "\" missing", NULL); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FATTR", "NOVALUE", NULL); goto end; |
︙ | ︙ |