Attempt to track an segfault in mst_kruskal()

(gdb) bt
#0  mst_kruskal () at graph.c:107
#1  graph () at graph.c:302
#2  0x00007ffff7b509fe in del_edge_h (c=<optimized out>, request=<optimized out>) at protocol_edge.c:292
#3  0x00007ffff7b4de2e in receive_request (c=0x5555557e3ef0, request=0x555555800e13 "13 3fc17404 node1 node2") at protocol.c:136
#4  0x00007ffff7b43513 in receive_meta (c=0x5555557e3ef0) at meta.c:290
#5  0x00007ffff7b442d9 in handle_meta_connection_data (c=0x5555557e3ef0) at net.c:291
#6  0x00007ffff7b41391 in event_loop () at event.c:287
#7  0x00007ffff7b449b2 in main_loop () at net.c:469
#8  0x0000555555556716 in main (argc=<optimized out>, argv=<optimized out>) at tincd.c:480
This commit is contained in:
thorkill 2015-07-02 20:38:02 +02:00
parent 826584011d
commit 743671278f

View file

@ -92,6 +92,17 @@ static void mst_kruskal(void) {
bool skipped = false;
for splay_each(edge_t, e, edge_weight_tree) {
if (!e->from) {
logger(DEBUG_ALWAYS, LOG_ERR, "current edge doesn't have from! - should abort");
skipped = true;
continue;
}
if (!e->to) {
logger(DEBUG_ALWAYS, LOG_ERR, "current edge doesn't have to! - should abort");
skipped = true;
continue;
}
if(!e->reverse || (e->from->status.visited == e->to->status.visited)) {
skipped = true;
continue;