diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-04-23 23:12:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-04-23 23:12:48 (GMT) |
commit | 5042737fef27c821535883dadfb0ad9ac81ad294 (patch) | |
tree | a2d88567facb59f16d83f6967eafd35f16fcdbbc /src/gtkext/graph | |
parent | 6cbb81bc46347ce969f5bf24a73f08abd009b82b (diff) |
Handled a strange case of jump outside the current routine.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@516 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph')
-rw-r--r-- | src/gtkext/graph/nodes/flow.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); |