mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-28 13:12:10 +01:00
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
This commit is contained in:
parent
ec81889c35
commit
4e43ed8112
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user