Tcl Source Code

View Ticket
Login
Ticket UUID: 521950
Title: Fix bad alloc in tclHash.c
Type: Bug Version: obsolete: 8.4a4
Submitter: mdejong Created on: 2002-02-24 02:46:01
Subsystem: 41. Memory Allocation Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-02-26 09:31:07
Resolution: Fixed Closed By: hobbs
    Closed on: 2002-02-26 02:31:07
Description:
The attached patch cleans up the hash alloc
code in the case of a really short string.
This comes up in Tk when you have a window
named ".t" and it gets added to the global
table. The problem is that the Tcl_HashEntry*
is pointing to an array of 19 bytes while
a Tcl_HashEntry takes up 20 bytes. This does
not cause any problems at runtime as far
as I can tell. It is really just an issue
of correctness. I can't imaging this patch
could possibly break anything so it should
be safe to apply.
User Comments: hobbs added on 2002-02-26 09:31:07:
Logged In: YES 
user_id=72656

added to 8.4a4cvs as provided.

mdejong added on 2002-02-24 09:46:03:

File Added - 18311: hash_alloc.patch

Attachments: