Bug 545807 - Color hash problem on x86_64.
Summary: Color hash problem on x86_64.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: 0xFFFF
Version: 12
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Nikola Pajkovsky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-09 12:15 UTC by Patrick Monnerat
Modified: 2014-02-02 22:14 UTC (History)
3 users (show)

Fixed In Version: 8.5.7-3.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-11 18:25:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch fixing the bug (506 bytes, patch)
2009-12-09 12:16 UTC, Patrick Monnerat
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.