Bug 22648

Summary: XaceHook passes bogus parameters to hook functions
Product: xorg Reporter: Michael Lorenz <macallan>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: blocker    
Priority: medium CC: alan.coopersmith, ewalsh, marc
Version: git   
Hardware: SPARC   
OS: NetBSD   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
This fixes the crash. none

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.