summaryrefslogtreecommitdiff
path: root/girepository
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2014-07-23 15:36:41 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-03-16 22:48:18 +0800
commit8d651e4d90377e71c3804032e33f6f6d97587d8b (patch)
tree15652877e95a46d72fec3a7cb0f2534a9fc9f64d /girepository
parent444648d6a8b97250e737bc46d00d8278a5c205d4 (diff)
downloadgobject-introspection-8d651e4d90377e71c3804032e33f6f6d97587d8b.tar.gz
cmph/bdz.c: Work Around MSVC 2012 x64 Compiler Bug
Due to an MSVC 2012 x64 compiler issue, the compiler generates bad code for bdz.c, so the for loop in assign() continues running until the point i falls below zero, causing an access violation when we try to do curr_edge=queue[i]; (line 427 in bdz.c). Address this issue by breaking out of the loop at the end of it when i reaches 0 after doing the necessary processing. https://bugzilla.gnome.org/show_bug.cgi?id=733595
Diffstat (limited to 'girepository')
-rw-r--r--girepository/cmph/bdz.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/girepository/cmph/bdz.c b/girepository/cmph/bdz.c
index 81cd7151..a1c907f1 100644
--- a/girepository/cmph/bdz.c
+++ b/girepository/cmph/bdz.c
@@ -455,6 +455,12 @@ static void assigning(bdz_config_data_t *bdz, bdz_graph3_t* graph3, bdz_queue_t
SETBIT(marked_vertices, v2);
}
DEBUGP("A:%u %u %u -- %u %u %u\n", v0, v1, v2, GETVALUE(bdz->g, v0), GETVALUE(bdz->g, v1), GETVALUE(bdz->g, v2));
+#if (_MSC_VER > 1699 && _MSC_VER < 1800)
+ /* This is bad, MSVC 2012 X64 getting confused with the value of i... */
+ /* an obvious MSVC 2012 X64 compiler bug :| */
+ if (i <= 0)
+ break;
+#endif
};
free(marked_vertices);
}