Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7aedded012f54cbe8cccac93cfa91458f23dce5e4928b92b86b9174e8a1c60bd
Ticket: 167e0635db79f05d23d766376f6eed32b1572451
`make valgrind` detections
User & Date: sebres on 2024-04-12 19:58:13
Changes

  1. icomment:
    Related to [0e273ad998f16100](./info/0e273ad998f16100)
    
    [Tcl_HashEntry::key](./file?ci=tip&name=generic/tcl.h&ln=1082-1090) is a union.
    So the key.string and key.oneWordValue pointing to the same memory.
    
    The next line (with memcpy) overwrites the same memory block (size is always larger than 1):
    ```
        hPtr->key.oneWordValue = 0; /* See Ticket [167e0635db] */
        memcpy(&hPtr->key.string, string, size);
    ```
    
    Your valgrind seems to be broken, Don.
    
    Or it is some weird constellation (strange alignment or similar thing) on this system, so sizeof and co going confused somewhere. What platform is it actually?
    
    However size is just strlen + 1. Therefore I can only repeat, that valgrind seems to claim nonsense here.
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"