Segmentation fault in stats.c
Hey there just upgraded to fedora 32 and kresd started crashing in the following line:
https://gitlab.labs.nic.cz/knot/knot-resolver/-/blob/v5.0.1/modules/stats/stats.c#L496
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ba20fe in stats_init (module=0x5555555d6170) at ../modules/stats/stats.c:496
496 sa->sa_family = AF_UNSPEC;
(gdb) l
491 if (array_reserve(data->upstreams.q, UPSTREAMS_COUNT) != 0) {
492 return kr_error(ENOMEM);
493 }
494 for (size_t i = 0; i < UPSTREAMS_COUNT; ++i) {
495 struct sockaddr *sa = (struct sockaddr *)&data->upstreams.q.at[i];
496 sa->sa_family = AF_UNSPEC;
497 }
498 return kr_ok();
499 }
500
(gdb) print sa
$2 = (struct sockaddr *) 0x0
(gdb) print data->upstreams
$3 = {q = {at = 0x5555555efba0, len = 0, cap = 1024}, head = 0}
Why does sa evaluate to 0x0, did something change in regards to memory allocation for the used ring-buffer? I can't quite figure out what's going on here, any help is appreciated.
Edited by MartB