After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689235 - Broken function declarations corrupt the stack on windows
Broken function declarations corrupt the stack on windows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.24.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 687157 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-28 18:21 UTC by Alan McGovern
Modified: 2012-12-02 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch containing the fix. (3.19 KB, patch)
2012-11-28 18:22 UTC, Alan McGovern
reviewed Details | Review
A less intrusive approach to fixing the same issue (1.00 KB, patch)
2012-11-29 10:52 UTC, Alan McGovern
committed Details | Review

Description Alan McGovern 2012-11-28 18:21:46 UTC
There are two broken typedefs in gdkwindow-win32.c which cause the stack to become corrupted if you attempt to change the opacity of a window or flash it. More detail in the commit message of the git style patch I've attached.
Comment 1 Alan McGovern 2012-11-28 18:22:55 UTC
Created attachment 230109 [details] [review]
Patch containing the fix.
Comment 2 Dieter Verfaillie 2012-11-28 18:42:49 UTC
Review of attachment 230109 [details] [review]:

Looks good to me, thanks!
Comment 3 Dieter Verfaillie 2012-11-28 18:51:45 UTC
Oh, missed that FlashWindowEx is only available starting
with XP. We might want to be careful with that one as we
still claim to support Windows 2000 (even though the whole
stack hasn't worked for ages on it and nobody complained
much, see bug #637565)
Comment 4 Alan McGovern 2012-11-29 10:52:14 UTC
Created attachment 230166 [details] [review]
A less intrusive approach to fixing the same issue

This is a less intrusive fix. It simply fixes the typedef declarations. This should be commitable as-is as it doesn't change minimum versions of windows. Realistically I'd say supporting anything older than Win XP (11.5 years old!) for new builds isn't going to benefit anyone, so I'd be all up for bumping the min supported version of windows to XP SP3 too.
Comment 5 Michael Natterer 2012-11-29 14:10:24 UTC
Thanks, pushed to gtk-2-24, gtk-3-6 and master:

commit 149de7162493055b24f2b5643ec11d45b76a4826
Author: Alan McGovern <alan@xamarin.com>
Date:   Fri Nov 23 15:38:34 2012 -0500

    Fix broken function pointer declarations on windows
    
    Both flashing a window and setting the window opacity were using
    incorrect declarations for function pointers. They were missing the
    WINAPI annotation as defined in windows.h. As a result, the stack
    could be corrupted when these functions were invoked.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689235
    (cherry picked from commit 5637ef1f97ee46666c97707ed7f6bae459007163)

 gdk/win32/gdkwindow-win32.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 6 Kalev Lember 2012-12-02 20:51:03 UTC
*** Bug 687157 has been marked as a duplicate of this bug. ***