summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/gtkext/graph/nodes/flow.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c1874c2..b9f23cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+15-04-24 Cyrille Bagard <nocbos@gmail.com>
+
+ * src/gtkext/graph/nodes/flow.c:
+ Handle a strange case of jump outside the current routine.
+
15-04-22 Cyrille Bagard <nocbos@gmail.com>
* src/dialogs/export.c:
diff --git a/src/gtkext/graph/nodes/flow.c b/src/gtkext/graph/nodes/flow.c
index 5ff21c9..558913e 100644
--- a/src/gtkext/graph/nodes/flow.c
+++ b/src/gtkext/graph/nodes/flow.c
@@ -327,6 +327,9 @@ static void g_flow_node_prepare_x_line(GFlowNode *node, GGraphNode *nodes)
{
target = G_FLOW_NODE(find_node_for_instruction(nodes, node->exits[0].instr));
+ /* Cf. commentaire de g_flow_node_link() */
+ if (target == NULL) break;
+
dest_slot = g_flow_node_get_slot(target, true,
last, node->exits[0].group_index);
@@ -335,6 +338,9 @@ static void g_flow_node_prepare_x_line(GFlowNode *node, GGraphNode *nodes)
{
target = G_FLOW_NODE(find_node_for_instruction(nodes, node->exits[1].instr));
+ /* Cf. commentaire de g_flow_node_link() */
+ if (target == NULL) break;
+
dest_slot = g_flow_node_get_slot(target, true,
last, node->exits[1].group_index);
@@ -555,6 +561,13 @@ void g_flow_node_link(GFlowNode *node, GGraphLayout *layout, GGraphNode *nodes)
{
target = G_FLOW_NODE(find_node_for_instruction(nodes, node->exits[i].instr));
+ /**
+ * Il semblerait que l'adresse ciblée puisse ne correspondre à aucun bloc.
+ * Ce serait le cas pour un saut avec __gmon_start__ sous ARM, à confirmer (TODO).
+ * Référence. : http://stackoverflow.com/questions/12697081/what-is-gmon-start-symbol
+ */
+ if (target == NULL) continue;
+
dest_slot = g_flow_node_get_slot(target, true,
last, node->exits[i].group_index);