Posted to tcl by apw at Tue Aug 21 21:17:05 GMT 2007view pretty
Problem is if contextPtr->numCallChain == CALL_CHAIN_STATIC_SIZE valgrind complaints about read error Index: tclOOCall.c =================================================================== RCS file: /cvsroot/tcl/oocore/generic/tclOOCall.c,v retrieving revision 1.3 diff -d -u -r1.3 tclOOCall.c --- tclOOCall.c 3 Aug 2007 12:20:48 -0000 1.3 +++ tclOOCall.c 21 Aug 2007 21:15:00 -0000 @@ -679,7 +679,7 @@ contextPtr->callChain = (struct MInvoke *) ckalloc(sizeof(struct MInvoke)*(contextPtr->numCallChain+1)); memcpy(contextPtr->callChain, contextPtr->staticCallChain, - sizeof(struct MInvoke) * (contextPtr->numCallChain + 1)); + sizeof(struct MInvoke) * (contextPtr->numCallChain)); } else if (contextPtr->numCallChain > CALL_CHAIN_STATIC_SIZE) { contextPtr->callChain = (struct MInvoke *) ckrealloc((char *) contextPtr->callChain,
Comments
Posted by dkf at Tue Aug 21 21:33:53 GMT 2007 [text] [code]
fixed