Artifacts Associated With Ticket 2973361
Ticket change [d79d5398c2] (rid 124021) by dgp on 2010-03-19 17:50:41:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Not really good with valgrind, but I think this points to real trouble, and suspect it may relate to intermittent segfaults I see in set-old.test: From a `make valgrind` run on default unix HEAD build: autoMkindex.test ==15475== Invalid read of size 4 ==15475== at 0x8119F90: TclInitCompileEnv (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x811A6E7: TclSetByteCodeFromAny (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x811A8B3: SetByteCodeFromAny (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x812E6CB: TclCompileObj (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x80DAA58: TclNREvalObjEx (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x80F422D: TryPostBody (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x80D465E: TclNRRunCallbacks (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x812EC2C: TclExecuteByteCode (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== Address 0x44B99C4 is 4 bytes before a block of size 40 alloc'd ==15475== at 0x40053C0: malloc (vg_replace_malloc.c:149) ==15475== by 0x8155E5C: TclpAlloc (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x80DEED4: Tcl_Alloc (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x8117ED9: TclCompileScript (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x811A726: TclSetByteCodeFromAny (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x811A8B3: SetByteCodeFromAny (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x812E6CB: TclCompileObj (in /home/dgp/cvs/tcl-only/unix/tcltest) ==15475== by 0x80DAA58: TclNREvalObjEx (in /home/dgp/cvs/tcl-only/unix/tcltest) Will continue to chase, but wanted the data in front of other eyeballs too which might have greater reading skill.
- foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "mem corrupt troubles, [try] ?"
- type initialized to: "Bug"
Ticket change [133881a32f] (rid 124175) by dgp on 2010-03-20 01:22:41:
- icomment:
With some chat help (thanks miguel!) here's a more useful picture: autoMkindex.test ==20100== Invalid read of size 4 ==20100== at 0x8147245: TclInitCompileEnv (tclCompile.c:1206) ==20100== by 0x81465E1: TclSetByteCodeFromAny (tclCompile.c:549) ==20100== by 0x81467ED: SetByteCodeFromAny (tclCompile.c:660) ==20100== by 0x81639CB: TclCompileObj (tclExecute.c:1721) ==20100== by 0x80F3421: TclNREvalObjEx (tclBasic.c:6030) ==20100== by 0x8115225: TryPostBody (tclCmdMZ.c:4489) ==20100== by 0x80F0D4D: TclNRRunCallbacks (tclBasic.c:4294) ==20100== by 0x817649C: TclExecuteByteCode (tclExecute.c:7983) ==20100== Address 0x48F4F4C is 4 bytes before a block of size 40 alloc'd ==20100== at 0x40053C0: malloc (vg_replace_malloc.c:149) ==20100== by 0x8196128: TclpAlloc (tclAlloc.c:708) ==20100== by 0x80FBD30: Tcl_Alloc (tclCkalloc.c:1044) ==20100== by 0x814B273: EnterCmdWordData (tclCompile.c:2874) ==20100== by 0x8147B46: TclCompileScript (tclCompile.c:1586) ==20100== by 0x8146635: TclSetByteCodeFromAny (tclCompile.c:571) ==20100== by 0x81467ED: SetByteCodeFromAny (tclCompile.c:660) ==20100== by 0x81639CB: TclCompileObj (tclExecute.c:1721)
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [305fe945c1] (rid 93243) by dgp on 2010-03-20 01:42:18:
- icomment:
dgpthe 2010-02-09 commit makes this particular failure happen in this particular place dgp(add compiler for [try]) dgpI suspect that flaw is actually older and deeper and the 2010-02-09 commit just moved it to where it's easier to notice
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0cf4494488] (rid 114273) by dgp on 2010-03-22 04:52:32:
- icomment:
when trouble arises, word == -1
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [feacce98b5] (rid 108630) by dgp on 2010-03-22 04:54:03:
- icomment:
tracks back to iPtr->invokeWord == -1.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [fc2eaadc7f] (rid 108185) by dgp on 2010-03-22 04:57:18:
- icomment:
...which is just a temporary sneaky storage slot for the value passed in by TryPostBody.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [4a14198398] (rid 126474) by dgp on 2010-03-22 05:01:30:
- assignee changed to: "dkf"
- icomment:
dkf, what are you trying to signal by passing in the -1 values? Do you really mean to pass in INT_MIN ?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [36d7ae97f5] (rid 107175) by dkf on 2010-03-22 08:13:18:
- icomment:
IIRC, it's trying to say "don't know which argument this was" because at that point I genuinely don't know which arg it was. If you want to figure that out and add it in, be my guest.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d5f4158eef] (rid 123725) by dgp on 2010-03-22 11:38:05:
- assignee changed to: "andreas_kupries"
- icomment:
Well, the "-1" values are undoubtedly the wrong thing to pass in. They are just causing attempts to read to the memory below the array in memory, which makes valgrind burp. INT_MAX appears to be a "don't know" or "don't attempt to use me" value that appears elsewhere. Assigning to the TIP 280 master for confirmation. I agree that ultimately it would be nicer to just compute the right values and pass them in. TclArgumentGet() appears to be a utility that may help with that. In the more immediate term, though, I just want to stop doing something broken. Unless aku objects, I think a -1 -> INT_MIN revision is a step in the right direction.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [d29c0d33a9] (rid 113558) by andreas_kupries on 2010-03-23 02:16:59:
- icomment:
Ok, found the place. tclBasic.c, line 5970ff seems to be where INT_MIN is checked for. The relevant ChangeLog entries seem to be 2008-06-08 and 2008-07-29
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [e54b7fe289] (rid 88102) by andreas_kupries on 2010-03-23 02:21:39:
- assignee changed to: "dgp"
- icomment:
Giving this back to dgp, he seems to be goign for the proper fix, i.e. determining the actual indices of the relevant words. [11:55]dgpINT_MIN [11:56]dgpsee Tcl_NREvalObj() [12:00]akudgp - Thanks. tclBasic, line 8206 ... Now I am confused. INT_MIN is < 0, and is the 'word' in TclInitCompileEnv ... nline cannot be <= and the condition should not short. IOW, with INT_MIN I do not see how this works. [12:00]akuAh, now I see [12:01]dgpdon't sweat it; I'm closing on the final fix [12:01]akutclBasic line 5970, that makes the explicit check for INT_MIN [12:01]akuok
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
Ticket change [c5a6bad7e3] (rid 112036) by dgp on 2010-03-23 05:46:04:
- closedate changed to: "2010-03-22T22:46:04"
- closer changed to: "dgp"
- icomment:
allow_comments - 1 fix committed.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"