Artifacts Associated With Ticket 3496014
Ticket change [2fecefc89e] (rid 93154) by stwo on 2012-03-01 16:13:52:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I don't think that the memset() in Tcl_SetByteArrayObj() (tclBinary.c, line 308) is necessary. The man page says nothing about clearing the memory and the memset() makes the function a tad slower.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "2"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "stwo"
- subsystem initialized to: "12. ByteArray Object"
- title initialized to: "Unecessary memset() in Tcl_SetByteArrayObj()"
- type initialized to: "Bug"
Ticket change [e6870f4c64] (rid 104305) by sebres on 2012-03-01 23:56:34:
- icomment:
Trunk? or wisch version did You mean exactly? For example it's not in core-8-5-brunch. Apart from that I'm entirely agree with You. I found it under Art. 17ece9b7b9bc918f31f1987ede4eb7857c8d5abf : - part of checkin [ce65d5a8de] on branch trunk - patch #2215022: clean up the binary ensemble initialization code Applied a patch from Duoas which extends the TclMakeEnsemble command to handle sub-ensembles from tables. Cleaned up the original patch a bit. (user: patthoyts ) [annotate] I think it was really not good idea.
- login: "sebres"
- mimetype: "text/plain"
- username: "sebres"
- icomment:
Ticket change [d5b963bf54] (rid 123678) by dkf on 2012-03-02 17:08:04:
- closedate changed to: "2012-03-02T10:08:04"
- closer changed to: "dkf"
- foundin changed to: "obsolete: 8.6b2"
- icomment:
allow_comments - 1
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [2d9ec35a76] (rid 119094) by dkf on 2012-03-02 17:11:04:
- icomment:
memset is now only done when the bytes argument is NULL; ensuring memory is in a known state is a reasonable approach, but there's no reason to write it twice.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [671c383475] (rid 102847) by sebres on 2012-03-02 18:15:35:
- foundin changed to: "None"
- icomment:
allow_comments - 0 Why should you do it in the other case? IMO, memory is in unknown state is not a reason for this
- login: "sebres"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- username: "sebres"
Ticket change [da973169d6] (rid 107815) by sebres on 2012-03-02 18:34:06:
- icomment:
for example the function Tcl_SetByteArrayLength does it not and it is as well.
- login: "sebres"
- mimetype: "text/plain"
- username: "sebres"
- icomment:
Ticket change [4b36f9a075] (rid 126661) by stwo on 2012-03-02 21:15:45:
- icomment:
I'm with sebres. Remove the memset! Let's keep things simple.
- login: "stwo"
- mimetype: "text/plain"
- username: "stwo"
- icomment:
Ticket change [1ff4e5201b] (rid 91231) by stwo on 2012-07-17 01:09:22:
- icomment:
Is this going to be fixed, or what?
- login: "stwo"
- mimetype: "text/plain"
- username: "stwo"
- icomment:
Ticket change [b84a1e722e] (rid 128944) by nijtmans on 2012-07-17 03:34:31:
- icomment:
The documentation contains (ByteArrObj.3): > If \fIbytes\fR is NULL then the new byte array contains > arbitrary values. I would say, null bytes are not arbibrary values ;-) Suggestion committed to branch bug-3496014, for anyone interested to try. I tried it and all tests pass. So, either adapt the implementation, as suggested by stwo, or adapt the documentation. I would prefer to keep the documentation as is.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [4193d8fbeb] (rid 116217) by nijtmans on 2012-08-23 19:12:45:
- assignee changed to: "nijtmans"
- closedate changed to: "2012-08-23T12:12:45"
- closer changed to: "nijtmans"
- icomment:
allow_comments - 1 Fixed on trunk. Same protection backported to Tcl 8.5 as well.
- login: "nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "nijtmans"