Bug 545807

Summary: Color hash problem on x86_64.
Product: [Fedora] Fedora Reporter: Patrick Monnerat <patrick>
Component: 0xFFFFAssignee: Nikola Pajkovsky <npajkovs>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dhoward, dwmw2, npajkovs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 8.5.7-3.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-11 18:25:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch fixing the bug none

Description Patrick Monnerat 2009-12-09 12:15:28 UTC
Description of problem:
A stack-allocated structure is used as a hash key for a color in Tk_GetColorByValue(). Compilation on x86_64 inserts some unused gaps in structures for alignment: this results in having undefined bits participating to the hash code computation, introducing the risk of missing a color that is already in the table.

Version-Release number of selected component (if applicable):
tk-8.5.7-2.fc12.x86_64

How reproducible:
No recipe: very random in nature.
I discovered this problem inadvertently while using valgrind on "insight" for another problem.

Additional info:
The attached patch fixes this problem by clearing the structure before assigning its fields.

Comment 1 Patrick Monnerat 2009-12-09 12:16:33 UTC
Created attachment 377159 [details]
Patch fixing the bug

Comment 2 Nikola Pajkovsky 2009-12-09 13:44:44 UTC
thx for patch. I will apply patch today.

Comment 3 Patrick Monnerat 2009-12-09 14:36:59 UTC
Please note this has not been reported upstream, and does not seem fixed on the project's CVS.

Comment 4 Nikola Pajkovsky 2009-12-09 14:39:57 UTC
I know I have a plan to talk with upstream and push the patch into cvs.

Comment 5 Fedora Update System 2009-12-09 18:46:27 UTC
tk-8.5.7-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/tk-8.5.7-3.fc12

Comment 6 Fedora Update System 2009-12-11 18:25:06 UTC
tk-8.5.7-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.