Hi, I just cloned the repo, installed DPDK, tried to compile F-Stack but there are two compiler errors where a temporary address is being assigned to a class member. Details below.
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c: In function ‘taskqueue_drain_tq_queue’:
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:381:24: error: storing the address of local variable ‘t_barrier’ in ‘*queue.tq_hint’ [-Werror=dangling-pointer=]
381 | queue->tq_hint = &t_barrier;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:366:21: note: ‘t_barrier’ declared here
366 | struct task t_barrier;
| ^~~~~~~~~
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:366:21: note: ‘queue’ declared here
In file included from /home/f-stack/lib/../freebsd/sys/_callout.h:43,
from /home/f-stack/lib/../freebsd/sys/callout.h:43,
from /home/f-stack/lib/../freebsd/sys/systm.h:46,
from /home/f-stack/lib/include/sys/systm.h:32,
from /home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:33:
In function ‘taskqueue_drain_tq_queue’,
inlined from ‘taskqueue_drain_all’ at /home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:599:8:
/home/f-stack/lib/../freebsd/sys/queue.h:391:27: error: storing the address of local variable ‘t_barrier’ in ‘*queue.tq_queue.stqh_last’ [-Werror=dangling-pointer=]
391 | (head)->stqh_last = &STAILQ_NEXT((elm), field); \
| ^
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:380:9: note: in expansion of macro ‘STAILQ_INSERT_TAIL’
380 | STAILQ_INSERT_TAIL(&queue->tq_queue, &t_barrier, ta_link);
| ^~~~~~~~~~~~~~~~~~
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c: In function ‘taskqueue_drain_all’:
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:366:21: note: ‘t_barrier’ declared here
366 | struct task t_barrier;
| ^~~~~~~~~
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:366:21: note: ‘queue’ declared here
In function ‘taskqueue_drain_tq_queue’,
inlined from ‘taskqueue_quiesce’ at /home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:636:9:
/home/f-stack/lib/../freebsd/sys/queue.h:391:27: error: storing the address of local variable ‘t_barrier’ in ‘*queue.tq_queue.stqh_last’ [-Werror=dangling-pointer=]
391 | (head)->stqh_last = &STAILQ_NEXT((elm), field); \
| ^
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:380:9: note: in expansion of macro ‘STAILQ_INSERT_TAIL’
380 | STAILQ_INSERT_TAIL(&queue->tq_queue, &t_barrier, ta_link);
| ^~~~~~~~~~~~~~~~~~
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c: In function ‘taskqueue_quiesce’:
/home/f-stack/lib/../freebsd/kern/subr_taskqueue.c:366:21: note: ‘t_barrier’ declared here
366 | struct task t_barrier;
| ^~~~~~~~~
Hi, I just cloned the repo, installed DPDK, tried to compile F-Stack but there are two compiler errors where a temporary address is being assigned to a class member. Details below.
The errors:
The code: