Tk Source Code

View Ticket
Login
Ticket UUID: 4b414efd7a7ef7fc37fb70d8fad5207ad4d5038b
Title: Tk_GetGC returns incorrect GC
Type: Patch Version: 8.6.4
Submitter: anonymous Created on: 2015-05-01 18:13:24
Subsystem: 64. Graphic Contexts Assigned To: jenglish
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2015-05-12 22:39:06
Resolution: None Closed By: nobody
    Closed on:
Description:
Tk_GetGC() can return an incorrect GC when a new GC is added which contains XGCValues that are default values. Example, set the foreground to black (value 0). The following patch adds valueMask to hash key, insuring a unique hash key.

tk8.6.4/generic/tkGC.c
31a32
>     unsigned long mask;
99a101
>     valueKey.mask = valueMask;
User Comments: jenglish added on 2015-05-12 22:39:06:
More information needed: it's not clear (to me anyway) under what circumstances the undesired behavior can occur, or even what the undesired behavior is.

Can the submitter supply an outline of the sequence of events that would cause a problem?  I'm not seeing it -- AFAICT, Tk_GetGC satisfies its contract.

dgp added on 2015-05-12 15:24:51:
Need to get this assigned to somebody.