Menu

#4803 pointer truncation on Win64 TCL_MEM_DEBUG builds

obsolete: 8.6b1.1
closed-fixed
5
2011-03-16
2011-03-02
Tim Baker
No

In generic/tclCkalloc.c there are 3 places where a pointer is cast to "unsigned long" which
is only 32bits (on MS Windows at least) resulting in truncation of 64bit memory addresses.
The "unsigned long" should be replaced with "size_t" or similar.

memp = (struct mem_header *) (((unsigned long) ptr) - BODY_OFFSET);

Discussion

  • Jan Nijtmans

    Jan Nijtmans - 2011-03-16

    Fixed on all open branches

     
  • Jan Nijtmans

    Jan Nijtmans - 2011-03-16
    • assigned_to: hobbs --> nijtmans
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB