Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Any idea on how to fix this?
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 2 Jul 2020 20:02:35 +0000 (22:02 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 2 Jul 2020 20:02:35 +0000 (22:02 +0200)
As a wild guess, tried to change the condition with 'message->state->routing_table[i][j] != -1'
but got weird crash (double free detected).

examples/c/dht-pastry/dht-pastry.c

index c6e5947..e6d6919 100644 (file)
@@ -395,6 +395,7 @@ static void handle_message(node_t node, pastry_message_t message)
       /* Update routing table */
       for (i = shl(node->id, message->state->id); i < LEVELS_COUNT; i++) {
         for (j = 0; j < LEVEL_SIZE; j++) {
+          // FIXME: this is a no-op!
           if (node->routing_table[i][j] == -1 && message->state->routing_table[i][j] == -1)
             node->routing_table[i][j] = message->state->routing_table[i][j];
         }