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 733595 - Fix the g-ir-compiler utility on Visual Studio 2012 x64
Fix the g-ir-compiler utility on Visual Studio 2012 x64
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: g-ir-compiler
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-23 08:48 UTC by Fan, Chun-wei
Modified: 2016-03-16 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cmph/bdz.c: Workaround MSVC 2012 x64 compiler bug (1.31 KB, patch)
2014-07-23 08:49 UTC, Fan, Chun-wei
none Details | Review
cmph/bdz.c: Workaround MSVC 2012 x64 compiler bug (1.31 KB, patch)
2016-03-16 10:41 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2014-07-23 08:48:16 UTC
Hi,

As I continue the attempt to make g-i buildable and usable with Visual Studio (without GCC) only, there seems to be a problem in g-ir-compiler that it crashes during the compilation of the .gir files.  It seems like, that when it runs assign() in cmph/bdz.c, the compiler gets confused about the value of i when running the for loop in that function.

Upon some investigation, the for loop is continued even when i falls below 0, which will cause an access violation as referencing a negative element of an array is being done.

I will attach a patch for the workaround for this issue, which is only used on Visual Studio 2012, as this seems clearly to me as a compiler issue.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2014-07-23 08:49:05 UTC
Created attachment 281466 [details] [review]
cmph/bdz.c: Workaround MSVC 2012 x64 compiler bug
Comment 2 André Klapper 2015-02-07 17:15:08 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 3 Fan, Chun-wei 2016-03-16 10:41:43 UTC
Created attachment 324084 [details] [review]
cmph/bdz.c: Workaround MSVC 2012 x64 compiler bug

Hi,

Re-posting patch for code style, to conform with the coding style of the rest of the file.

With blessings, thank you!
Comment 4 Colin Walters 2016-03-16 12:39:38 UTC
Review of attachment 324084 [details] [review]:

Haven't looked in detail, but seems reasonable.
Comment 5 Fan, Chun-wei 2016-03-16 14:55:16 UTC
Hi Colin,

Thanks!  I have pushed the patch as 8d651e4.

With blessings, thank you!