|
2010-03-23
| ||
| 05:46 | • Closed ticket [2973361fff]: mem corrupt troubles, try ? plus 7 other chang... artifact: c5a6bad7e3 user: dgp | |
| 02:21 | • Ticket [2973361fff]: 5 changes artifact: e54b7fe289 user: andreas_kupries | |
| 02:16 | • Ticket [2973361fff]: 4 changes artifact: d29c0d33a9 user: andreas_kupries | |
|
2010-03-22
| ||
| 11:38 | • Ticket [2973361fff]: 5 changes artifact: d5f4158eef user: dgp | |
| 08:13 | • Ticket [2973361fff]: 4 changes artifact: 36d7ae97f5 user: dkf | |
| 05:01 | • Ticket [2973361fff]: 5 changes artifact: 4a14198398 user: dgp | |
| 04:57 | • Ticket [2973361fff]: 4 changes artifact: fc2eaadc7f user: dgp | |
| 04:54 | • Ticket [2973361fff]: 4 changes artifact: feacce98b5 user: dgp | |
| 04:52 | • Ticket [2973361fff]: 4 changes artifact: 0cf4494488 user: dgp | |
|
2010-03-20
| ||
| 01:42 | • Ticket [2973361fff]: 4 changes artifact: 305fe945c1 user: dgp | |
| 01:22 | • Ticket [2973361fff]: 4 changes artifact: 133881a32f user: dgp | |
|
2010-03-19
| ||
| 17:50 | • New ticket [2973361fff]. artifact: d79d5398c2 user: dgp | |
mem corrupt troubles, [try] ?
Closed / Fixed2973361fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-03-19 17:50:41
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.
dgpplain2010-03-20 01:22:41
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)
dgpplain2010-03-20 01:42:18
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
dgpplain2010-03-22 04:52:32
when trouble arises, word == -1
dgpplain2010-03-22 04:54:03
tracks back to iPtr->invokeWord == -1.
dgpplain2010-03-22 04:57:18
...which is just a temporary sneaky storage slot for the value passed in by TryPostBody.
dgpplain2010-03-22 05:01:30
dkf, what are you trying to signal by passing in the -1 values? Do you really mean to pass in INT_MIN ?
dkfplain2010-03-22 08:13:18
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.
dgpplain2010-03-22 11:38:05
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.
andreas_kupriesplain2010-03-23 02:16:59
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
andreas_kupriesplain2010-03-23 02:21:39
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
dgpplain2010-03-23 05:46:04
allow_comments - 1 fix committed.
Log in (anonymous is fine) to add a comment.