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 687157 - Incorrect Win32 API function prototype declarations
Incorrect Win32 API function prototype declarations
Status: RESOLVED DUPLICATE of bug 689235
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-10-29 22:55 UTC by nus
Modified: 2012-12-02 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add missing WINAPI declarations (905 bytes, patch)
2012-10-29 22:59 UTC, nus
none Details | Review

Description nus 2012-10-29 22:55:58 UTC
In gdk/win32/gdkwindow-win32.c the 'PFN_FlashWindowEx' and 'PFN_SetLayeredWindowAttributes' function prototypes miss the 'WINAPI' calling convention declaration. As a result, the code produced when compiled by the MSVC10 toolchain, asssumes the 'cdecl' calling convention, double-cleaning the stack. I haven't checked if the same happens for MinGW toolchains.
This bug is present on both 'master' and 'gtk-2-24' branches.
Comment 1 nus 2012-10-29 22:59:56 UTC
Created attachment 227599 [details] [review]
add missing WINAPI declarations
Comment 2 nus 2012-10-30 00:29:56 UTC
This might manifested itself in rather strange ways, in my case it made g_type_check_instance_cast throw a memory access violation exception, when passed an invalid GtkTypeRefeference as the result of the stack messup.
Comment 3 nus 2012-10-30 04:30:48 UTC
In fact, same happens for a GCC produced GTK+ build (mingw32-gtk2-2.24.13-1.fc19.noarch.rpm).
Comment 4 Kalev Lember 2012-12-02 20:51:03 UTC

*** This bug has been marked as a duplicate of bug 689235 ***