Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2011-03-16
22:58 • Closed ticket [3197864fff]: pointer truncation on Win64 TCL_MEM_DEBUG builds... artifact: 76d97e4aa8 user: nijtmans
2011-03-02
22:05 • New ticket [3197864fff]. artifact: 57ad7ff089 user: treectrl

pointer truncation on Win64 TCL_MEM_DEBUG builds

Closed / Fixed3197864fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2011-03-02 22:05:51
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);
nijtmansplain2011-03-16 22:58:22
allow_comments - 1

Fixed on all open branches
Log in (anonymous is fine) to add a comment.