Skip to content

Commit

Permalink
fix: fixes FATAL SIGNAL 11 on gossmap node
Browse files Browse the repository at this point in the history
This will fix a crash that I caused on armv7
and by looking inside the coredump with gdb
(by adding an assert on n that must be
different from null) I get the following stacktrace

    at plugins/libplugin.c:1208

I do not know if this is a solution because I do not know
when I can parse a node announcement for a node that
it is not longer in the gossip map.

So, I hope this is just usefult for @rustyrussell

Changelog-Fixes: fixes `FATAL SIGNAL 11` on gossmap node announcement parsing.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Feb 13, 2023
1 parent 1800139 commit c62a3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/gossmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ static void node_announcement(struct gossmap *map, size_t nann_off)

feature_len = map_be16(map, nann_off + feature_len_off);
map_nodeid(map, nann_off + feature_len_off + 2 + feature_len + 4, &id);
n = gossmap_find_node(map, &id);
n->nann_off = nann_off;
if ((n = gossmap_find_node(map, &id)))
n->nann_off = nann_off;
}

static void reopen_store(struct gossmap *map, size_t ended_off)
Expand Down

0 comments on commit c62a3eb

Please sign in to comment.