F-Stack / f-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.
http://www.f-stack.org
Other
3.87k stars 898 forks source link

Adding -DNDEBUG flag will cause the helloworld example to crash #705

Closed renzibei closed 1 year ago

renzibei commented 2 years ago

Hello, I find that if -DNDEBUG flag is added to the compile-options, the helloworld example will crash. After the modification, the CFLAGS line in the Makefile file becomes

CFLAGS += -O -DNDEBUG -gdwarf-2 $(shell $(PKGCONF) --cflags libdpdk)

And when I running the helloworld program, it will crashes or print many lines of unknown event: 00000000.

Can you help look into the reason of it?

renzibei commented 2 years ago

I used the compiled static library of f-stack. Maybe the status of NDEBUG macro in the header files of f-stack codes will affect the ABI stability?

jfb8856606 commented 1 year ago

Fixed.
Because assert((kq = ff_kqueue()) > 0); was be ignored and nevents used usigned type.