Posted to tcl by apw at Tue Aug 21 21:17:05 GMT 2007view raw

  1. Problem is if contextPtr->numCallChain == CALL_CHAIN_STATIC_SIZE
  2. valgrind complaints about read error
  3.  
  4. Index: tclOOCall.c
  5. ===================================================================
  6. RCS file: /cvsroot/tcl/oocore/generic/tclOOCall.c,v
  7. retrieving revision 1.3
  8. diff -d -u -r1.3 tclOOCall.c
  9. --- tclOOCall.c 3 Aug 2007 12:20:48 -0000 1.3
  10. +++ tclOOCall.c 21 Aug 2007 21:15:00 -0000
  11. @@ -679,7 +679,7 @@
  12. contextPtr->callChain = (struct MInvoke *)
  13. ckalloc(sizeof(struct MInvoke)*(contextPtr->numCallChain+1));
  14. memcpy(contextPtr->callChain, contextPtr->staticCallChain,
  15. - sizeof(struct MInvoke) * (contextPtr->numCallChain + 1));
  16. + sizeof(struct MInvoke) * (contextPtr->numCallChain));
  17. } else if (contextPtr->numCallChain > CALL_CHAIN_STATIC_SIZE) {
  18. contextPtr->callChain = (struct MInvoke *)
  19. ckrealloc((char *) contextPtr->callChain,
  20.  

Comments

Posted by dkf at Tue Aug 21 21:33:53 GMT 2007 [text] [code]

fixed