Bug 22648 - XaceHook passes bogus parameters to hook functions
Summary: XaceHook passes bogus parameters to hook functions
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: SPARC NetBSD
: medium blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 23:11 UTC by Michael Lorenz
Modified: 2009-07-07 17:32 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
This fixes the crash. (4.79 KB, patch)
2009-07-06 23:11 UTC, Michael Lorenz
no flags Details | Splinter Review

Description Michael Lorenz 2009-07-06 23:11:20 UTC
Created attachment 27443 [details] [review]
This fixes the crash.

The way XaceHook() mixes struct initializers and va_arg() is not portable and gives bogus data on sparc and probably others leading to a crash.

Fix:
Don't use initializers, instead set each member directly to enforce order.
Comment 1 Michael Lorenz 2009-07-06 23:26:45 UTC
As far as I can tell this has nothing to do with NetBSD, it will likely affect Linux and Solaris as well.
Comment 2 Eamon Walsh 2009-07-07 17:32:46 UTC
Pushed, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.